summaryrefslogtreecommitdiff
path: root/lib/chef/application/solo.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-07-05 15:01:31 -0700
committerdanielsdeleo <dan@opscode.com>2013-07-05 15:26:09 -0700
commit07ea110f8694b5b3a36fb936e7eaa46a9ce86050 (patch)
tree694bca908e5cd71b6bf66b9e07966959dc025adb /lib/chef/application/solo.rb
parent8505ed76e545af010e3d66b2882732fcfffc0084 (diff)
downloadchef-07ea110f8694b5b3a36fb936e7eaa46a9ce86050.tar.gz
Print debug stacktraces from within a forked worker
Fixes CHEF-4357: http://tickets.opscode.com/browse/CHEF-4357 Rescue exceptions from within a forker worker and feed them to `Chef::Application.debug_stacktrace()`, then exit non-zero. This fixes an issue where Chef would spew ruby stacktraces with forking enabled (stacktraces should only be printed to console with `-l debug`). Additionally fixes an issue where a generic exception was passed to `debug_stacktrace`, leaving a stacktrace.out file with no useful information. In addition to the above fixes, includes the following improvements: * Update the forked worker's argv0 to clearly indicate it's the worker process, and include ppid and run start time. * When reaping the worker process, include more useful information when the worker exited non-successfully, such as exit code or signal that killed the process. In particular, OOM kill (e.g., when running resource intensive code compile, etc. on small machine) should be a little more obvious.
Diffstat (limited to 'lib/chef/application/solo.rb')
-rw-r--r--lib/chef/application/solo.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index 7e316dc260..5e3fe90607 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -253,7 +253,6 @@ class Chef::Application::Solo < Chef::Application
sleep Chef::Config[:interval]
retry
else
- Chef::Application.debug_stacktrace(e)
Chef::Application.fatal!("#{e.class}: #{e.message}", 1)
end
end