]> git.openstreetmap.org Git - chef.git/commitdiff
Install irqbalance + set policy hint ignore on 12.10 and above.
authorGrant Slater <git@firefishy.com>
Tue, 10 Jun 2014 14:28:46 +0000 (15:28 +0100)
committerGrant Slater <git@firefishy.com>
Tue, 10 Jun 2014 14:29:04 +0000 (15:29 +0100)
cookbooks/hardware/recipes/default.rb
cookbooks/hardware/templates/default/irqbalance.erb [new file with mode: 0644]

index 4d797a52bf6a0f5f15533743a2b776dab79b5cf1..916e380e27bf467469a9e047675f7d768fa551a4 100644 (file)
@@ -145,6 +145,22 @@ if node[:kernel][:modules].include?("ipmi_si")
   package "ipmitool"
 end
 
+package "irqbalance"
+if node[:lsb][:release].to_f >= 12.10
+    template "/etc/default/irqbalance" do
+      source "irqbalance.erb"
+      owner "root"
+      group "root"
+      mode 0644
+    end
+
+    service "irqbalance" do
+      action [ :start, :enable ]
+      supports :status => false, :restart => true, :reload => false
+      subscribes :restart, "template[/etc/default/irqbalance]"
+    end
+end
+
 tools_packages = []
 status_packages = {}
 
diff --git a/cookbooks/hardware/templates/default/irqbalance.erb b/cookbooks/hardware/templates/default/irqbalance.erb
new file mode 100644 (file)
index 0000000..38839f6
--- /dev/null
@@ -0,0 +1,11 @@
+# DO NOT EDIT - This file is being maintained by Chef
+#Configuration for the irqbalance daemon
+
+#Should irqbalance be enabled?
+ENABLED="1"
+#Balance the IRQs only once?
+ONESHOT="0"
+
+#irqbalance maintainer recommends ignore hint policy
+#http://sourceforge.net/p/e1000/bugs/394/?page=1
+OPTIONS="--hintpolicy=ignore"