summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
diff options
context:
space:
mode:
authorPhil Dibowitz <phil@ipom.com>2017-10-09 20:06:44 -0700
committerGitHub <noreply@github.com>2017-10-09 20:06:44 -0700
commit537d4e33052466680113a07fb1d4efa96d8e06d4 (patch)
tree0a1306a868bab334759343045dd7981bd24f602f /lib/chef/client.rb
parente53a7deffe5f88f5c8f28f6d2ae7c8553b0f588e (diff)
downloadchef-537d4e33052466680113a07fb1d4efa96d8e06d4.tar.gz
Support new CriticalOhaiPlugins (#6486)
We should not stack-trace, we should exit with a clean error Signed-off-by: Phil Dibowitz <phil@ipom.com>
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r--lib/chef/client.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index 9f8a34e85e..ed55cd791d 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -605,6 +605,9 @@ class Chef
filter = Chef::Config[:minimal_ohai] ? %w{fqdn machinename hostname platform platform_version os os_version} : nil
ohai.all_plugins(filter)
events.ohai_completed(node)
+ rescue Ohai::Exceptions::CriticalPluginFailure => e
+ Chef::Log.error("Critical Ohai plugins failed: #{e.message}")
+ exit(false)
end
#