From a20d6162f11154f248503f4145afff3a511afc98 Mon Sep 17 00:00:00 2001 From: Claire McQuin Date: Thu, 1 May 2014 14:38:07 -0700 Subject: add option to abandon chef run if blocked by another for too long --- lib/chef/client.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/chef/client.rb') 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' - -- cgit v1.2.1