]> git.openstreetmap.org Git - chef.git/commitdiff
Teach chef about mpt3sas
authorTom Hughes <tom@compton.nu>
Mon, 20 Jul 2015 21:42:34 +0000 (22:42 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 20 Jul 2015 21:42:34 +0000 (22:42 +0100)
cookbooks/hardware/attributes/default.rb
cookbooks/hardware/recipes/default.rb

index b558f9d8e3cc7792e7e077f05ece3a5770d694c6..f80e6a528d6bf2476d45dea3331733da95a1a8dc 100644 (file)
@@ -23,7 +23,7 @@ if Chef::Util.compare_versions(node[:kernel][:release], [3, 3]) < 0
 end
 
 if node[:kernel] && node[:kernel][:modules]
-  raidmods = node[:kernel][:modules].keys & %w(cciss hpsa mptsas mpt2sas megaraid_mm megaraid_sas aacraid)
+  raidmods = node[:kernel][:modules].keys & %w(cciss hpsa mptsas mpt2sas mpt3sas megaraid_mm megaraid_sas aacraid)
 
   unless raidmods.empty?
     default[:apt][:sources] |= ["hwraid"]
index 6a324a36e4d30846e3ff4acb4330fe4b7f67d150..f19446969c2d33c11f0f28b8ed81faa91ae8a5b2 100644 (file)
@@ -191,7 +191,7 @@ node[:kernel][:modules].each_key do |modname|
   when "mptsas"
     tools_packages << "lsiutil"
     # status_packages["mpt-status"] ||= []
-  when "mpt2sas"
+  when "mpt2sas", "mpt3sas"
     tools_packages << "sas2ircu"
     status_packages["sas2ircu-status"] ||= []
   when "megaraid_mm"
@@ -327,7 +327,7 @@ if status_packages["sas2ircu-status"]
   Dir.glob("/sys/class/scsi_host/host*") do |host|
     driver = File.new("#{host}/proc_name").read.chomp
 
-    next unless driver == "mpt2sas"
+    next unless driver == "mpt2sas" || driver == "mpt3sas"
 
     bus = host.sub("/sys/class/scsi_host/host", "")