From: Tom Hughes Date: Wed, 6 Nov 2013 18:39:37 +0000 (+0000) Subject: Only monitor the first cciss device on each controller X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/4b684eea1ab4af459576aac53d761f0af6fb46ef?ds=sidebyside Only monitor the first cciss device on each controller --- diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index a81e0966c..a561681ac 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -172,8 +172,8 @@ end node[:block_device].each do |name,attributes| if attributes[:vendor] == "HP" and attributes[:model] == "LOGICAL VOLUME" - if name =~ /^cciss!(.*)$/ - status_packages["cciss-vol-status"] |= [ "cciss/#{$1}" ] + if name =~ /^cciss!(c[0-9]+)d[0-9]+$/ + status_packages["cciss-vol-status"] |= [ "cciss/#{$1}d0" ] else Dir.glob("/sys/block/#{name}/device/scsi_generic/*").each do |sg| status_packages["cciss-vol-status"] |= [ File.basename(sg) ]