summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-11-10 15:08:25 -0800
committertyler-ball <tyleraball@gmail.com>2014-12-17 18:50:10 -0800
commitc6732b92c8b501800c9009dd2f4d04042f9bca9c (patch)
tree8a591de65214c83b7c41dbdd0cdcfc3697d54be7 /lib/chef/client.rb
parentd20d3aca4e6cc947322c347ba6b7a0f6260576b6 (diff)
downloadchef-c6732b92c8b501800c9009dd2f4d04042f9bca9c.tar.gz
Sending to correct server URL
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r--lib/chef/client.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index 8cadd43878..b27a2b693d 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -330,6 +330,7 @@ class Chef
runner.converge
@events.converge_complete
rescue Exception => e
+ Chef::Log.error("Converge failed with error message #{e.message}")
@events.converge_failed(e)
converge_exception = e
end
@@ -350,15 +351,16 @@ class Chef
converge_exception
end
- # TODO are failed audits going to raise exceptions, or only be handled by the reporters?
def run_audits(run_context)
audit_exception = nil
begin
@events.audit_phase_start(run_status)
+ Chef::Log.info("Starting audit phase")
auditor = Chef::Audit::Runner.new(run_context)
auditor.run
@events.audit_phase_complete
rescue Exception => e
+ Chef::Log.error("Audit phase failed with error message #{e.message}")
@events.audit_phase_failed(e)
audit_exception = e
end
@@ -439,8 +441,8 @@ class Chef
run_context = setup_run_context
- converge_error = converge_and_save(run_context)
- audit_error = run_audits(run_context)
+ converge_error = converge_and_save(run_context) unless (Chef::Config[:audit_mode] == true)
+ audit_error = run_audits(run_context) unless (Chef::Config[:audit_mode] == false)
if converge_error || audit_error
e = Chef::Exceptions::RunFailedWrappingError.new(converge_error, audit_error)