]> git.openstreetmap.org Git - chef.git/commitdiff
Recognise some extra disk statuses on HP controllers
authorTom Hughes <tom@compton.nu>
Sun, 24 Jul 2022 21:24:49 +0000 (22:24 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 24 Jul 2022 21:29:27 +0000 (22:29 +0100)
cookbooks/hardware/templates/default/ohai.rb.erb

index 63f4806d93dd971769c4fb759c73f3235f917421..f6b854c99356054c76bb952ca8befc0d615b9325 100644 (file)
@@ -417,10 +417,14 @@ Ohai.plugin(:Hardware) do
 
       if disk[:status] == "Failed"
         disk[:status] = "failed"
+      elsif disk[:status] == "Predictive Failure"
+        disk[:status] = "failed"
       elsif disk[:status] == "OK" && disk[:drive_type] == "Data Drive"
         disk[:status] = "online"
       elsif disk[:status] == "OK" && disk[:drive_type] == "Spare Drive"
         disk[:status] = "hotspare"
+      elsif disk[:status] == "OK" && disk[:drive_type] == "Unassigned Drive"
+        disk[:status] = "unconfigured"
       else
         disk[:status] = "unknown"
       end