summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2015-07-27 10:15:12 -0700
committerClaire McQuin <claire@getchef.com>2015-07-28 12:27:31 -0700
commitfc21e33fb0024a76a02ae338c41c54dff302638d (patch)
tree83ecb2aae78acbb4cd8f2c27f1d6e219be2ba367
parentd2dd6d42a1190dfc0b99bddd49639bb781205434 (diff)
downloadchef-mcquin/ohai-config.tar.gz
for debuggingmcquin/ohai-config
-rw-r--r--Gemfile2
-rw-r--r--kitchen-tests/.kitchen.yml1
-rw-r--r--lib/chef/application.rb3
-rw-r--r--lib/chef/application/client.rb3
4 files changed, 7 insertions, 2 deletions
diff --git a/Gemfile b/Gemfile
index c5b0f15bc3..a191ef4956 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,6 +5,8 @@ gem "activesupport", "< 4.0.0", :group => :compat_testing, :platform => "ruby"
gem 'chef-config', path: "chef-config"
+# gem 'ohai', github: 'chef/ohai', branch: 'mcquin/ohai-config/remove-config-log'
+
group(:docgen) do
gem "tomlrb"
gem "yard"
diff --git a/kitchen-tests/.kitchen.yml b/kitchen-tests/.kitchen.yml
index c853f51b8d..63aefbb931 100644
--- a/kitchen-tests/.kitchen.yml
+++ b/kitchen-tests/.kitchen.yml
@@ -33,6 +33,5 @@ platforms:
suites:
- name: webapp
run_list:
- - recipe[apt::default]
- recipe[webapp::default]
attributes:
diff --git a/lib/chef/application.rb b/lib/chef/application.rb
index 0563822ede..88a6600995 100644
--- a/lib/chef/application.rb
+++ b/lib/chef/application.rb
@@ -401,6 +401,9 @@ class Chef
# Log a fatal error message to both STDERR and the Logger, exit the application
def fatal!(msg, err = -1)
Chef::Log.fatal(msg)
+ Chef::Log.fatal("Chef::Config.ohai[:log_level] is #{Chef::Config.ohai[:log_level]} (#{Chef::Config.ohai[:log_level].class})")
+ Chef::Log.fatal("Configuration: #{Chef::Config.configuration}")
+ Chef::Log.fatal(caller.join("\n"))
Process.exit err
end
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb
index 409680b553..ceb96d0c94 100644
--- a/lib/chef/application/client.rb
+++ b/lib/chef/application/client.rb
@@ -399,6 +399,7 @@ class Chef::Application::Client < Chef::Application
end
@signal = nil
+
run_chef_client(Chef::Config[:specific_recipes])
Chef::Application.exit!("Exiting", 0) if !Chef::Config[:interval]
@@ -410,7 +411,7 @@ class Chef::Application::Client < Chef::Application
Chef::Log.debug("#{e.class}: #{e}\n#{e.backtrace.join("\n")}")
retry
else
- Chef::Application.fatal!("#{e.class}: #{e.message}", 1)
+ Chef::Application.fatal!("#{e.class}: #{e.message}\n #{e.backtrace.join("\n")}", 1)
end
end
end