From: Tom Hughes Date: Wed, 2 Jan 2019 18:19:50 +0000 (+0000) Subject: Don't monitor unconfigured or failed disks X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/3b44b7908a0a6c8f8e72ce2680d70df4a187e117 Don't monitor unconfigured or failed disks --- diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index f2af6c986..cdf37d881 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -351,7 +351,7 @@ if !intel_ssds.empty? || !intel_nvmes.empty? end disks = disks.map do |disk| - next if disk[:state] == "spun_down" + next if disk[:state] == "spun_down" || %w[unconfigured failed].any?(disk[:status]) if disk[:smart_device] controller = node[:hardware][:disk][:controllers][disk[:controller]]