summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/application/solo.rb3
-rw-r--r--lib/chef/client.rb7
-rw-r--r--spec/integration/solo/solo_spec.rb2
3 files changed, 9 insertions, 3 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)
diff --git a/spec/integration/solo/solo_spec.rb b/spec/integration/solo/solo_spec.rb
index cc9ba1abb2..9500e7a1ca 100644
--- a/spec/integration/solo/solo_spec.rb
+++ b/spec/integration/solo/solo_spec.rb
@@ -92,7 +92,7 @@ EOM
# We have a timeout protection here so that if due to some bug
# run_lock gets stuck we can discover it.
expect {
- Timeout.timeout(120) do
+ Timeout.timeout(1200) do
chef_dir = File.join(File.dirname(__FILE__), "..", "..", "..")
# Instantiate the first chef-solo run