Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 0.6.0
-
Component/s: None
-
Labels:None
-
Environment:
FreeBSD
Description
I've seen this problem on FreeBSD and I've been able to duplicate it on Mac OS X as well but I don't know about other platforms.
Long running commands (such as installing via ports in FreeBSD) do not show the output logged to standard out as it's created. Rather, they output all at once, only when the command has finished. This isn't much of a problem for short-running commands but it can be a big problem for commands that take a while to run (such as installing packages, especially from source).
Obviously, this is to do with buffering.
I have some fixes (for the run_command mixin) that address the issue on FreeBSD but I won't add the patches here until I manage to write some unit tests that show up the issue...
Activity
Matthew Landauer
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Adam Jacob [ adam ] | |
| Resolution | Fixed [ 1 ] |
Matthew Landauer
made changes -
| Fix Version/s | 0.6.0 [ 10007 ] |
Adam Jacob
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
Bryan McLellan [Opscode]
made changes -
| Component/s | Infrastructure [ 10006 ] |
Bryan McLellan [Opscode]
made changes -
| Workflow | jira [ 10277 ] | New OSS [ 18369 ] |
Bryan McLellan [Opscode]
made changes -
| Workflow | New OSS [ 18369 ] | OSS: Product Management [ 26277 ] |
| Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
|---|---|---|---|---|---|---|---|---|---|
|
22h 45m | 1 | Matthew Landauer | 12/Mar/09 12:33 AM | |||||
|
41d 12m | 1 | Adam Jacob | 22/Apr/09 12:45 AM |
Enclosed patches also now will show the STDOUT and STDERR messages interleaved in the correct order, rather than just showing all the STDOUT messages followed by all the STDERR messages.
Patches here: http://github.com/mlandauer/chef/tree/chef-173
I would appreciate it if people could have a good hard look at the patches as the logging is pretty core to things and also there might be subtle error situations which are not handled properly. Also, there of course cross-platform differences which could cause problems.
The most troublesome change I had to make is here:
http://github.com/mlandauer/chef/blob/6ccd3662817ca2fe29ee17fb4bb0a21a908e1111/chef/lib/chef/mixin/command.rb#L159
setting args[:waitlast] to true (if it isn't overridden)