Details
Description
Description:
Looping over a resource (i.e. an execute resource), changing the parameters but not the identifier, prints out a somewhat cryptic message about the state of the resource.
[Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Setting execute[touch_file] to the state of the prior execute[touch_file]
I noticed this several weeks ago (with 0.10.4), but as it still produced the desired effect, I didn't change anything. Now, with Chef 0.10.6, the only the first parameter set is applied. Although the resource appears to converge multiple times, it does not use the subsequent parameter sets. Also, removing the 'not_if' (see below).
Both behaviors makes sense. Perhaps raising an exception instead of resetting the state would be appropriate.
Thanks!
Recipe:
files = %w(one.txt two.txt) files.each do |filename| execute "touch_file" do command "touch /tmp/#{filename}" # It works without this 'not_if' not_if "ls /tmp/#{filename}" end end execute "ls_file" do command "ls /tmp/two.txt" end
10.4 Run (successful exit)
[root@cionebox chef]# chef-solo -j broken.json -l debug [Wed, 14 Dec 2011 22:40:31 +0000] INFO: *** Chef 0.10.4 *** [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Building node object for cionebox [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Extracting run list from JSON attributes provided on command line [Wed, 14 Dec 2011 22:40:32 +0000] INFO: Setting the run_list to ["recipe[onebox::broken]"] from JSON [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Applying attributes from json file [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Platform is fedora version 15 [Wed, 14 Dec 2011 22:40:32 +0000] INFO: Run List is [recipe[onebox::broken]] [Wed, 14 Dec 2011 22:40:32 +0000] INFO: Run List expands to [onebox::broken] [Wed, 14 Dec 2011 22:40:32 +0000] INFO: Starting Chef Run for cionebox [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: No chefignore file found at /opt/titan/chef/cookbooks/chefignore no files will be ignored [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Loading cookbook endpoint's library file: /opt/titan/chef/cookbooks/endpoint/libraries/chef_ext.rb [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Loading cookbook endpoint's library file: /opt/titan/chef/cookbooks/endpoint/libraries/bindings.rb [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Loading cookbook yggdrasil's providers from /opt/titan/chef/cookbooks/yggdrasil/providers/event.rb [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Loaded contents of /opt/titan/chef/cookbooks/yggdrasil/providers/event.rb into a provider named yggdrasil_event defined in Chef::Provider::YggdrasilEvent [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Loading cookbook yggdrasil's resources from /opt/titan/chef/cookbooks/yggdrasil/resources/event.rb [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Loaded contents of /opt/titan/chef/cookbooks/yggdrasil/resources/event.rb into a resource named yggdrasil_event defined in Chef::Resource::YggdrasilEvent [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Node cionebox loading cookbook graphite's attribute file /opt/titan/chef/cookbooks/graphite/attributes/graphite.rb [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Loading cookbook munin's definitions from /opt/titan/chef/cookbooks/munin/definitions/munin_plugin.rb [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Loading Recipe onebox::broken via include_recipe [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Found recipe broken in cookbook onebox [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Setting execute[touch_file] to the state of the prior execute[touch_file] [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Loading from cookbook_path: /opt/titan/chef/cookbooks [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Converging node cionebox [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Processing execute[touch_file] on cionebox [Wed, 14 Dec 2011 22:40:32 +0000] INFO: Processing execute[touch_file] action run (onebox::broken line 3) [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Executing ls /tmp/one.txt [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: ---- Begin output of ls /tmp/one.txt ---- [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: STDOUT: /tmp/one.txt [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: STDERR: [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: ---- End output of ls /tmp/one.txt ---- [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Ran ls /tmp/one.txt returned 0 [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Skipping execute[touch_file] due to not_if [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Processing execute[touch_file] on cionebox [Wed, 14 Dec 2011 22:40:32 +0000] INFO: Processing execute[touch_file] action run (onebox::broken line 3) [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Executing ls /tmp/two.txt [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: ---- Begin output of ls /tmp/two.txt ---- [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: STDOUT: /tmp/two.txt [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: STDERR: [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: ---- End output of ls /tmp/two.txt ---- [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Ran ls /tmp/two.txt returned 0 [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Skipping execute[touch_file] due to not_if [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Processing execute[ls_file] on cionebox [Wed, 14 Dec 2011 22:40:32 +0000] INFO: Processing execute[ls_file] action run (onebox::broken line 9) [Wed, 14 Dec 2011 22:40:32 +0000] INFO: execute[ls_file] sh(ls /tmp/two.txt) /tmp/two.txt [Wed, 14 Dec 2011 22:40:32 +0000] INFO: execute[ls_file] ran successfully [Wed, 14 Dec 2011 22:40:32 +0000] INFO: Chef Run complete in 0.48186 seconds [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Cleaning the checksum cache [Wed, 14 Dec 2011 22:40:32 +0000] INFO: Running report handlers [Wed, 14 Dec 2011 22:40:32 +0000] INFO: Resources updated this run: [Wed, 14 Dec 2011 22:40:32 +0000] INFO: execute[ls_file] [Wed, 14 Dec 2011 22:40:32 +0000] INFO: Report handlers complete [Wed, 14 Dec 2011 22:40:32 +0000] DEBUG: Exiting
10.6 Run (unsuccessful exit)
[root@cionebox chef]# chef-solo -j broken.json -l debug [Wed, 14 Dec 2011 22:43:03 +0000] INFO: *** Chef 0.10.6 *** [Wed, 14 Dec 2011 22:43:04 +0000] DEBUG: Building node object for cionebox [Wed, 14 Dec 2011 22:43:04 +0000] DEBUG: Extracting run list from JSON attributes provided on command line [Wed, 14 Dec 2011 22:43:04 +0000] INFO: Setting the run_list to ["recipe[onebox::broken]"] from JSON [Wed, 14 Dec 2011 22:43:04 +0000] DEBUG: Applying attributes from json file [Wed, 14 Dec 2011 22:43:04 +0000] DEBUG: Platform is fedora version 15 [Wed, 14 Dec 2011 22:43:04 +0000] INFO: Run List is [recipe[onebox::broken]] [Wed, 14 Dec 2011 22:43:04 +0000] INFO: Run List expands to [onebox::broken] [Wed, 14 Dec 2011 22:43:04 +0000] INFO: Starting Chef Run for cionebox [Wed, 14 Dec 2011 22:43:04 +0000] INFO: Running start handlers [Wed, 14 Dec 2011 22:43:04 +0000] INFO: Start handlers complete. [Wed, 14 Dec 2011 22:43:04 +0000] DEBUG: No chefignore file found at /opt/titan/chef/cookbooks/chefignore no files will be ignored [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Loading cookbook endpoint's library file: /opt/titan/chef/cookbooks/endpoint/libraries/chef_ext.rb [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Loading cookbook endpoint's library file: /opt/titan/chef/cookbooks/endpoint/libraries/bindings.rb [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Loading cookbook yggdrasil's providers from /opt/titan/chef/cookbooks/yggdrasil/providers/event.rb [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Loaded contents of /opt/titan/chef/cookbooks/yggdrasil/providers/event.rb into a provider named yggdrasil_event defined in Chef::Provider::YggdrasilEvent [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Loading cookbook yggdrasil's resources from /opt/titan/chef/cookbooks/yggdrasil/resources/event.rb [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Loaded contents of /opt/titan/chef/cookbooks/yggdrasil/resources/event.rb into a resource named yggdrasil_event defined in Chef::Resource::YggdrasilEvent [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Node cionebox loading cookbook graphite's attribute file /opt/titan/chef/cookbooks/graphite/attributes/graphite.rb [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Loading cookbook munin's definitions from /opt/titan/chef/cookbooks/munin/definitions/munin_plugin.rb [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Loading Recipe onebox::broken via include_recipe [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Found recipe broken in cookbook onebox [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Setting execute[touch_file] to the state of the prior execute[touch_file] [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Loading from cookbook_path: /opt/titan/chef/cookbooks [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Converging node cionebox [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Processing execute[touch_file] on cionebox [Wed, 14 Dec 2011 22:43:05 +0000] INFO: Processing execute[touch_file] action run (onebox::broken line 3) [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: sh(ls /tmp/one.txt) [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: sh(ls /tmp/two.txt) [Wed, 14 Dec 2011 22:43:05 +0000] INFO: execute[touch_file] sh(touch /tmp/one.txt) [Wed, 14 Dec 2011 22:43:05 +0000] INFO: execute[touch_file] ran successfully [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Processing execute[touch_file] on cionebox [Wed, 14 Dec 2011 22:43:05 +0000] INFO: Processing execute[touch_file] action run (onebox::broken line 3) [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: sh(ls /tmp/one.txt) /tmp/one.txt [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Skipping execute[touch_file] due to not_if command `ls /tmp/one.txt` [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Processing execute[ls_file] on cionebox [Wed, 14 Dec 2011 22:43:05 +0000] INFO: Processing execute[ls_file] action run (onebox::broken line 9) [Wed, 14 Dec 2011 22:43:05 +0000] INFO: execute[ls_file] sh(ls /tmp/two.txt) [Wed, 14 Dec 2011 22:43:05 +0000] ERROR: execute[ls_file] (onebox::broken line 9) has had an error [Wed, 14 Dec 2011 22:43:05 +0000] ERROR: execute[ls_file] (/opt/titan/chef/cookbooks/onebox/recipes/broken.rb:9:in `from_file') had an error: execute[ls_file] (onebox::broken line 9) had an error: Chef::Exceptions::ShellCommandFailed: Expected process to exit with [0], but received '2' ---- Begin output of ls /tmp/two.txt ---- STDOUT: STDERR: ls: cannot access /tmp/two.txt: No such file or directory ---- End output of ls /tmp/two.txt ---- Ran ls /tmp/two.txt returned 2 /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/shell_out.rb:206:in `invalid!' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/shell_out.rb:192:in `error!' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/mixin/shell_out.rb:36:in `shell_out!' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/provider/execute.rb:58:in `action_run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource.rb:440:in `send' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource.rb:440:in `run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:45:in `run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:81:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:81:in `each' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:81:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection.rb:94:in `execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection.rb:92:in `execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:76:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/client.rb:312:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/client.rb:160:in `run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application/solo.rb:192:in `run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application/solo.rb:183:in `loop' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application/solo.rb:183:in `run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application.rb:67:in `run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/chef-solo:25 /usr/bin/chef-solo:19:in `load' /usr/bin/chef-solo:19 [Wed, 14 Dec 2011 22:43:05 +0000] ERROR: Running exception handlers [Wed, 14 Dec 2011 22:43:05 +0000] INFO: Resources updated this run: [Wed, 14 Dec 2011 22:43:05 +0000] INFO: execute[touch_file] [Wed, 14 Dec 2011 22:43:05 +0000] ERROR: Exception handlers complete [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Re-raising exception: Chef::Exceptions::ShellCommandFailed - execute[ls_file] (onebox::broken line 9) had an error: Chef::Exceptions::ShellCommandFailed: Expected process to exit with [0], but received '2' ---- Begin output of ls /tmp/two.txt ---- STDOUT: STDERR: ls: cannot access /tmp/two.txt: No such file or directory ---- End output of ls /tmp/two.txt ---- Ran ls /tmp/two.txt returned 2 /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/shell_out.rb:206:in `invalid!' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/shell_out.rb:192:in `error!' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/mixin/shell_out.rb:36:in `shell_out!' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/provider/execute.rb:58:in `action_run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource.rb:440:in `send' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource.rb:440:in `run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:45:in `run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:81:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:81:in `each' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:81:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection.rb:94:in `execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection.rb:92:in `execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:76:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/client.rb:312:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/client.rb:160:in `run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application/solo.rb:192:in `run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application/solo.rb:183:in `loop' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application/solo.rb:183:in `run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application.rb:67:in `run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/chef-solo:25 /usr/bin/chef-solo:19:in `load' /usr/bin/chef-solo:19 [Wed, 14 Dec 2011 22:43:05 +0000] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [Wed, 14 Dec 2011 22:43:05 +0000] DEBUG: Chef::Exceptions::ShellCommandFailed: execute[ls_file] (onebox::broken line 9) had an error: Chef::Exceptions::ShellCommandFailed: Expected process to exit with [0], but received '2' ---- Begin output of ls /tmp/two.txt ---- STDOUT: STDERR: ls: cannot access /tmp/two.txt: No such file or directory ---- End output of ls /tmp/two.txt ---- Ran ls /tmp/two.txt returned 2 /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/shell_out.rb:206:in `invalid!' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/shell_out.rb:192:in `error!' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/mixin/shell_out.rb:36:in `shell_out!' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/provider/execute.rb:58:in `action_run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource.rb:440:in `send' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource.rb:440:in `run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:45:in `run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:81:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:81:in `each' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:81:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection.rb:94:in `execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/resource_collection.rb:92:in `execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/runner.rb:76:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/client.rb:312:in `converge' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/client.rb:160:in `run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application/solo.rb:192:in `run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application/solo.rb:183:in `loop' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application/solo.rb:183:in `run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/../lib/chef/application.rb:67:in `run' /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/bin/chef-solo:25 /usr/bin/chef-solo:19:in `load' /usr/bin/chef-solo:19 [Wed, 14 Dec 2011 22:43:05 +0000] FATAL: Chef::Exceptions::ShellCommandFailed: execute[ls_file] (onebox::broken line 9) had an error: Chef::Exceptions::ShellCommandFailed: Expected process to exit with [0], but received '2' ---- Begin output of ls /tmp/two.txt ---- STDOUT: STDERR: ls: cannot access /tmp/two.txt: No such file or directory ---- End output of ls /tmp/two.txt ---- Ran ls /tmp/two.txt returned 2
I'm seeing similar behavior in 10.8, which broke one of our cookbooks.
we're going to work around this in the shell script the recipe runs.