]> git.openstreetmap.org Git - chef.git/commitdiff
Record spun up status consistently
authorTom Hughes <tom@compton.nu>
Wed, 2 Jan 2019 18:54:12 +0000 (18:54 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 2 Jan 2019 18:55:42 +0000 (18:55 +0000)
cookbooks/hardware/templates/default/ohai.rb.erb

index 074f5cbf6e35c624ecda8fe39e7dc3a922df02e2..82194acf29769c5cbd7405c81c4d8107505e5898 100644 (file)
@@ -444,8 +444,8 @@ Ohai.plugin(:Hardware) do
           when "Online" then disk[:status] = "online"
           when "Hotspare" then disk[:status] = "hotspare"
           when "Failed" then disk[:status] = "failed"
           when "Online" then disk[:status] = "online"
           when "Hotspare" then disk[:status] = "hotspare"
           when "Failed" then disk[:status] = "failed"
-          when "Spun Up" then disk[:spun_down] = false
-          when "Spun down" then disk[:spun_down] = true
+          when "Spun Up" then disk[:state] = "spun_up"
+          when "Spun down" then disk[:state] = "spun_down"
           end
         end
       elsif disk && line =~ /^(\S.*\S)\s*:\s+(\S.*)$/
           end
         end
       elsif disk && line =~ /^(\S.*\S)\s*:\s+(\S.*)$/