summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
diff options
context:
space:
mode:
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)