diff options
author | Claire McQuin <claire@getchef.com> | 2014-05-01 14:38:07 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-05-05 09:25:05 -0700 |
commit | a20d6162f11154f248503f4145afff3a511afc98 (patch) | |
tree | ec4e924cdbd12b9014bddb4fa9261a7d6a44a3f5 /lib/chef/client.rb | |
parent | 561b564d28e12731434513f1783cd519690e144b (diff) | |
download | chef-a20d6162f11154f248503f4145afff3a511afc98.tar.gz |
add option to abandon chef run if blocked by another for too long
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r-- | lib/chef/client.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb index 2e5963e996..635cfddfb3 100644 --- a/lib/chef/client.rb +++ b/lib/chef/client.rb @@ -224,7 +224,12 @@ class Chef Chef::Log.debug "Forked instance successfully reaped (pid: #{pid})" true else - do_run + begin + do_run + rescue Exception => e + Chef::Log.error(e.to_s) + exit 1 + end end end @@ -496,7 +501,7 @@ class Chef if Chef::Config[:ssl_verify_mode] == :verify_none and !Chef::Config[:verify_api_cert] Chef::Log.warn(<<-WARN) -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * SSL validation of HTTPS requests is disabled. HTTPS connections are still encrypted, but chef is not able to detect forged replies or man in the middle attacks. @@ -518,7 +523,7 @@ To check your SSL configuration, or troubleshoot errors, you can use the knife ssl check -c #{Chef::Config.config_file} ``` -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * WARN end end @@ -530,4 +535,3 @@ end require 'chef/cookbook_loader' require 'chef/cookbook_version' require 'chef/cookbook/synchronizer' - |