From cd446e3697fc347071fa60ea023be036063e1c10 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Tue, 10 Jun 2014 15:28:46 +0100 Subject: [PATCH] Install irqbalance + set policy hint ignore on 12.10 and above. --- cookbooks/hardware/recipes/default.rb | 16 ++++++++++++++++ .../hardware/templates/default/irqbalance.erb | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 cookbooks/hardware/templates/default/irqbalance.erb 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" -- 2.43.2