summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-10-31 15:05:10 -0700
committertyler-ball <tyleraball@gmail.com>2014-12-17 18:51:33 -0800
commit772232776ed10465708d1ddab7c7238a199f6199 (patch)
treefa1eca74bf4e831d6a92498c425b18e9d1ee9020 /lib/chef/client.rb
parent8efee3e8ed41dc7cd4ae0b4a1664467dd403346d (diff)
downloadchef-772232776ed10465708d1ddab7c7238a199f6199.tar.gz
Adding audit mode JSON formatter
First pass at DSL additions Renaming DSL methods to match the spec Creating our own example group class to simplify adding examples to the spec runner Adding logic for exceptions from converge phase not interfering with audit phase and vice-versa Adding error handling so saving node doesn't prevent us from running audit mode - decouples converge phase and audit phase more Updating for github comments Add setup phase to audit-mode. Refactor runner into own class. Fix typo tie things together Adding first round of formatter integration - STDOUT doc formatter Preparing for demo - using rspec documentation formatter for output instead of the proxy Add serverspec types and matchers. add rspec/its Add gems as core dependencies Updating with changes from demo Updating with @mcquin and @lamont comments Getting rid of unused method Wiring audit event proxy to send events correctly to the audit_reporter removing old pry debugging statement Removing unecessary todo Sending to correct server URL Fixing TODOs Adding uncaught error information
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r--lib/chef/client.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index b27a2b693d..16315b8e08 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
@@ -355,12 +354,10 @@ class Chef
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 +438,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)