]> git.openstreetmap.org Git - chef.git/commitdiff
Don't monitor unconfigured or failed disks
authorTom Hughes <tom@compton.nu>
Wed, 2 Jan 2019 18:19:50 +0000 (18:19 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 2 Jan 2019 18:55:42 +0000 (18:55 +0000)
cookbooks/hardware/recipes/default.rb

index f2af6c9863af0365a1ec0081777f1c670da4ba7c..cdf37d881a1f18bfcb4290f5df4cf7018b40d87d 100644 (file)
@@ -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]]