From: Tom Hughes Date: Fri, 13 Mar 2015 11:33:18 +0000 (+0000) Subject: Don't try and monitor spun down hot spare disks X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/75df66b6f12abec9b6d3859eea2375fa8bf4289e?ds=sidebyside Don't try and monitor spun down hot spare disks --- diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index c9da86168..914ff6d73 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -280,6 +280,8 @@ if status_packages["megaclisas-status"] IO.popen(["megacli", "-PDList", "-a#{controller}", "-NoLog"]).each do |line| disks << { :device => device, :driver => "megaraid", :id => Regexp.last_match[1] } if line =~ /^Device Id: ([0-9]+)$/ + + disks.pop if line =~ /^Firmware state: Hotspare, Spun down$/ end controller += 1