Skip to content

Instantly share code, notes, and snippets.

@mkocher
Created July 22, 2011 17:22
Show Gist options
  • Save mkocher/1099898 to your computer and use it in GitHub Desktop.
Save mkocher/1099898 to your computer and use it in GitHub Desktop.
execute "check file cache path" do
command "ls #{Chef::Config[:file_cache_path]}"
end
lobot@lobot-virtual-machine:~/ci-setup$ ROLE=test soloist
running chef: sudo bash -c 'PATH=/home/lobot/.rvm/gems/ree-1.8.7-2011.03@cimonitor/bin:/home/lobot/.rvm/gems/ree-1.8.7-2011.03@global/bin:/home/lobot/.rvm/rubies/ree-1.8.7-2011.03/bin:/home/lobot/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games GEM_HOME=/home/lobot/.rvm/gems/ree-1.8.7-2011.03@cimonitor GEM_PATH=/home/lobot/.rvm/gems/ree-1.8.7-2011.03@cimonitor:/home/lobot/.rvm/gems/ree-1.8.7-2011.03@global ROLE=test chef-solo -j /tmp/soloist20110713-28423-1fbsdgp-0 -c /tmp/soloist20110713-28423-18c8bz9-0 -l info'
[sudo] password for lobot:
[Wed, 13 Jul 2011 10:02:26 -0700] INFO: *** Chef 0.10.2 ***
[Wed, 13 Jul 2011 10:02:26 -0700] INFO: Setting the run_list to ["lobot_ubuntu::file_cache_path"] from JSON
[Wed, 13 Jul 2011 10:02:26 -0700] INFO: Run List is [recipe[lobot_ubuntu::file_cache_path]]
[Wed, 13 Jul 2011 10:02:26 -0700] INFO: Run List expands to [lobot_ubuntu::file_cache_path]
[Wed, 13 Jul 2011 10:02:26 -0700] INFO: Starting Chef Run for lobot-virtual-machine
[Wed, 13 Jul 2011 10:02:26 -0700] INFO: Processing execute[check file cache path] action run (lobot_ubuntu::file_cache_path line 1)
[Wed, 13 Jul 2011 10:02:26 -0700] INFO: execute[check file cache path] sh(ls /var/chef/cache)
[Wed, 13 Jul 2011 10:02:27 -0700] ERROR: execute[check file cache path] (lobot_ubuntu::file_cache_path line 1) has had an error
[Wed, 13 Jul 2011 10:02:27 -0700] ERROR: Running exception handlers
[Wed, 13 Jul 2011 10:02:27 -0700] ERROR: Exception handlers complete
[Wed, 13 Jul 2011 10:02:27 -0700] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[Wed, 13 Jul 2011 10:02:27 -0700] FATAL: Chef::Exceptions::ShellCommandFailed: execute[check file cache path] (lobot_ubuntu::file_cache_path line 1) had an error: Expected process to exit 0, but it exited with 2
---- Begin output of ls /var/chef/cache ----
STDOUT:
STDERR: ls: cannot access /var/chef/cache: No such file or directory
---- End output of ls /var/chef/cache ----
Ran ls /var/chef/cache returned 2
lobot@lobot-virtual-machine:~/ci-setup$ ROLE=test soloist
running chef: sudo bash -c 'PATH=/home/lobot/.rvm/gems/ree-1.8.7-2011.03@cimonitor/bin:/home/lobot/.rvm/gems/ree-1.8.7-2011.03@global/bin:/home/lobot/.rvm/rubies/ree-1.8.7-2011.03/bin:/home/lobot/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games GEM_HOME=/home/lobot/.rvm/gems/ree-1.8.7-2011.03@cimonitor GEM_PATH=/home/lobot/.rvm/gems/ree-1.8.7-2011.03@cimonitor:/home/lobot/.rvm/gems/ree-1.8.7-2011.03@global ROLE=test chef-solo -j /tmp/soloist20110713-28466-1eb35im-0 -c /tmp/soloist20110713-28466-kq9bou-0 -l info'
[Wed, 13 Jul 2011 10:02:39 -0700] INFO: *** Chef 0.10.2 ***
[Wed, 13 Jul 2011 10:02:39 -0700] INFO: Setting the run_list to ["lobot_ubuntu::file_cache_path"] from JSON
[Wed, 13 Jul 2011 10:02:39 -0700] INFO: Run List is [recipe[lobot_ubuntu::file_cache_path]]
[Wed, 13 Jul 2011 10:02:39 -0700] INFO: Run List expands to [lobot_ubuntu::file_cache_path]
[Wed, 13 Jul 2011 10:02:39 -0700] INFO: Starting Chef Run for lobot-virtual-machine
[Wed, 13 Jul 2011 10:02:39 -0700] INFO: Processing execute[check file cache path] action run (lobot_ubuntu::file_cache_path line 1)
[Wed, 13 Jul 2011 10:02:39 -0700] INFO: execute[check file cache path] sh(ls /var/chef/cache)
chef-stacktrace.out
[Wed, 13 Jul 2011 10:02:39 -0700] INFO: execute[check file cache path] ran successfully
[Wed, 13 Jul 2011 10:02:39 -0700] INFO: Chef Run complete in 0.011454 seconds
[Wed, 13 Jul 2011 10:02:39 -0700] INFO: Running report handlers
[Wed, 13 Jul 2011 10:02:39 -0700] INFO: Report handlers complete
lobot@lobot-virtual-machine:~/ci-setup$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment