From: Grant Slater Date: Tue, 10 Jun 2014 14:28:46 +0000 (+0100) Subject: Install irqbalance + set policy hint ignore on 12.10 and above. X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/cd446e3697fc347071fa60ea023be036063e1c10 Install irqbalance + set policy hint ignore on 12.10 and above. --- diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 4d797a52b..916e380e2 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -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 index 000000000..38839f6e7 --- /dev/null +++ b/cookbooks/hardware/templates/default/irqbalance.erb @@ -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"