From ecc8dd9135f63f682922d0be2a567640a5ac4826 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Tue, 14 Nov 2017 22:02:51 -0500 Subject: Add ohai_time to minimal_ohai filter We need ohai_time to get the 'Last Check-In' time on the Chef Server. There is really no risk to including it. Signed-off-by: Bryan McLellan --- lib/chef/client.rb | 2 +- spec/unit/client_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chef/client.rb b/lib/chef/client.rb index ed55cd791d..1211e9425e 100644 --- a/lib/chef/client.rb +++ b/lib/chef/client.rb @@ -602,7 +602,7 @@ class Chef # @api private # def run_ohai - filter = Chef::Config[:minimal_ohai] ? %w{fqdn machinename hostname platform platform_version os os_version} : nil + filter = Chef::Config[:minimal_ohai] ? %w{fqdn machinename hostname platform platform_version ohai_time os os_version} : nil ohai.all_plugins(filter) events.ohai_completed(node) rescue Ohai::Exceptions::CriticalPluginFailure => e diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb index 95f308d130..2aff7b2a71 100644 --- a/spec/unit/client_spec.rb +++ b/spec/unit/client_spec.rb @@ -38,7 +38,7 @@ describe Chef::Client do end it "runs ohai with only the minimum required plugins" do - expected_filter = %w{fqdn machinename hostname platform platform_version os os_version} + expected_filter = %w{fqdn machinename hostname platform platform_version ohai_time os os_version} expect(ohai_system).to receive(:all_plugins).with(expected_filter) client.run_ohai end -- cgit v1.2.1