diff options
author | tyler-ball <tyleraball@gmail.com> | 2014-11-11 18:49:55 -0800 |
---|---|---|
committer | tyler-ball <tyleraball@gmail.com> | 2014-11-11 18:49:55 -0800 |
commit | e334dd999acb79a56f78a5bcc156e4f5a67c646e (patch) | |
tree | 025ba4866951e22060f1cb937a3dc914f6acb4a9 /lib | |
parent | 933233295a6c08f2aefe39a0f08f28fa5d3aa3e2 (diff) | |
download | chef-e334dd999acb79a56f78a5bcc156e4f5a67c646e.tar.gz |
Fixing failing spec test and audit-mode flag
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/application/solo.rb | 3 | ||||
-rw-r--r-- | lib/chef/client.rb | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb index 474bbf3f6c..16b0c59259 100644 --- a/lib/chef/application/solo.rb +++ b/lib/chef/application/solo.rb @@ -204,6 +204,9 @@ class Chef::Application::Solo < Chef::Application config_fetcher = Chef::ConfigFetcher.new(Chef::Config[:json_attribs]) @chef_client_json = config_fetcher.fetch_json end + + # If we don't specify this, solo will try to perform the audits + Chef::Config[:audit_mode] = false end def setup_application diff --git a/lib/chef/client.rb b/lib/chef/client.rb index 16315b8e08..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 @@ -354,10 +355,12 @@ 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 @@ -438,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) |