summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-11-14 15:40:24 -0800
committertyler-ball <tyleraball@gmail.com>2014-12-17 18:50:10 -0800
commitd20d3aca4e6cc947322c347ba6b7a0f6260576b6 (patch)
treeca7a7c2501cb705504b1c5d75515e6528ca1648b /lib/chef/client.rb
parent221131fa38d77fd3e1cd914fba4dde73b749b78b (diff)
downloadchef-d20d3aca4e6cc947322c347ba6b7a0f6260576b6.tar.gz
Make sure we don't close the output_stream after running rspec.
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r--lib/chef/client.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index b27a2b693d..8cadd43878 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -330,7 +330,6 @@ 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
@@ -351,16 +350,15 @@ 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
@@ -441,8 +439,8 @@ class Chef
run_context = setup_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)
+ converge_error = converge_and_save(run_context)
+ audit_error = run_audits(run_context)
if converge_error || audit_error
e = Chef::Exceptions::RunFailedWrappingError.new(converge_error, audit_error)