This module installs and manages the irqbalance daemon. It will accept any option or environment variable that irqbalance supports and will simply ignore anything not supported by the default irqbalance version that comes with the distribution.
This module will not manage the running state of the irqbalance service when
applied to a single processor system, or when oneshot
is set to yes. In
these scenarios the service_ensure
parameter is simply ignored.
The Upstart init script that was included with Ubuntu Trusty Tahr (14.04) does not seem to support the full set of options that the installed irqbalance version itself supports.
If manage_init_script_file
is set to true, this module will generally
provide a sensible init script replacement for Ubuntu distributions.
Additionally, if you wish to provide your own init script you can do so by
passing the appropriate parameter:
eg. upstart_init_script_file_source
or systemd_init_script_file_template
.
This module will default to using the following init types to manage the service:
- CentOS/RHEL5 will use SysV init scripts.
- CentOS/RHEL6 will use SysV init scripts.
- CentOS/RHEL7 will use systemd.
- Fedora will use systemd.
- Debian 6 will use SysV init scripts.
- Debian 7 will use SysV init scripts.
- Ubuntu 10.04 will use Upstart.
- Ubuntu 12.04 will use Upstart.
- Ubuntu 14.04 will use Upstart.
- SLES 11 SP1 will use SysV init scripts.
- Gentoo will use OpenRC.
Debian 7 and Ubuntu 14.04 support systemd as a non-default init but note that neither come with an irqbalance service unit file. Examples of managing irqbalance under systemd on Debian/Ubuntu are shown below.
Install and run the irqbalance service using the distribution defaults:
include '::irqbalance'
Set the powerthresh option to 2 if the irqbalance version included with this distribution supports it:
class { '::irqbalance':
powerthresh => '2',
}
Set all of the irqbalance options at once: (These won't be checked to see if the installed irqbalance version supports them)
class { '::irqbalance':
args => '--powerthresh=2 --deepestcache=2',
}
Set the ONESHOT environment variable:
class { '::irqbalance':
oneshot => 'yes',
}
Use your own irqbalance configuration file:
class { '::irqbalance':
config_file_source => '/path/to/config',
}
Manage irqbalance on Debian 7 under systemd (untested):
class { '::irqbalance':
$manage_init_script_file => true,
$service_provider = 'systemd'
$systemd_init_script_file_template = 'irqbalance/init/systemd/without-foreground-irqbalance.service.erb'
}
Manage irqbalance on Ubuntu 14.04 under systemd (untested):
class { '::irqbalance':
$manage_init_script_file => true,
$service_provider = 'systemd'
$systemd_init_script_file_template = 'irqbalance/init/systemd/with-foreground-irqbalance.service.erb'
}
Must be an array. eg. affinity_mask => ['ff000000', '0000000'],
Must be an array. eg. banned_cpus => ['fc3', '0000001'],
Must be an array. eg. banned_interrupts => ['01', '03'],
Can be set to 'yes', but accepts most boolean forms as a string. If set, the
service_ensure
parameter will be ignored.
eg. oneshot => 'yes',
Must be an array. eg. banirq => ['01', '03', '04'],
eg. banscript => '/path/to/banscript.sh',
Must be set to true or false. Mostly ignored unless the irqbalance version also supports the foreground option. eg. debug => true,
eg. deepestcache => '2',
eg. hintpolicy => 'exact',
Generally ignored when using SysV init scripts, as they use their own path.
eg. pid => '/path/to/irqbalance.pid',
eg. policyscript => '/path/to/policyscript.sh',
eg. powerthresh => '2',
Options that will passed to irqbalance, in the same way that one would do it from the command line. eg. args => '--powerthresh=2 --deepestcache=2',
Group for the irqbalance configuration file. Defaults to '0'.
Mode for the irqbalance configuration file. Defaults to '0644'.
The filename that the irqbalance configuration is written into.
Owner for the irqbalance configuration file. Defaults to '0'.
Used for providing your own irqbalance configuration file.
Needs to follow the same requirements as the Puppet File source attribute.
eg. config_file_source => 'puppet:///modules/irqbalance/config/irq.conf',
If this parameter is provided, you should also set the oneshot
parameter to
'yes' if the file contains ONESHOT=yes, since this module does not know about
the contents and uses oneshot
to decide how to manage the service. See the
service_ensure
parameter.
Determines which template Puppet should use for the irqbalance configuration.
Determines whether to include a dependency class for this irqbalance module. eg. dependency_class => 'irqbalance_deps',
Determines whether to manage init scripts. Defaults to false. It is recommended that this be set to true to ensure that you can use most available options that irqbalance supports. This will also need to be set to true if the distribution does not provide one for systemd. For example, Debian Wheezy.
Determines whether to manage the systemd unit file directory. Defaults to true. In the next release this directory will be unmanaged by this module and this parameter will be removed.
Sets the irqbalance package to be installed. Can be set to present
,
'latest', or a specific version.
Determines whether to manage the irqbalance package. Defaults to true.
Determines whether to use systemd init scripts on certain Debian or Ubuntu distributions.
Determines if the service should be enabled at boot.
Determines if the service should be running or not. This parameter is ignored
if running on a single processor system, or if oneshot
is set to 'yes'.
Selects whether Puppet should manage the service. eg. service_manage => false
Group for the systemd init service file. Defaults to '0'.
Mode for the systemd init service file. Defaults to '0644'.
Owner for the systemd init service file. Defaults to '0'.
Used for providing your own irqbalance systemd service file for systems using systemd.
Determines which systemd service template Puppet should use for systems using systemd.
Group for SysV-like init scripts. Defaults to '0'.
Mode for SysV-like init scripts. Defaults to '0755'.
Owner for SysV-like init scripts. Defaults to '0'.
Used for providing your own irqbalance init script for systems using SysV-like init.
Determines which init script template Puppet should use for systems using SysV-like init.
Group for Upstart init scripts. Defaults to '0'.
Mode for Upstart init scripts. Defaults to '0644'.
Owner for Upstart init scripts. Defaults to '0'.
Used for providing your own irqbalance init script for systems using Upstart.
Determines which init script template Puppet should use for systems using Upstart.
This module has received very limited testing on:
- CentOS/RHEL 5/6/7
- Debian 6/7
- Fedora 20
- SLES 11 SP1
- Ubuntu 10.04/12.04/14.04
against Puppet 3.8.7 and Puppet 4.x
Patches are welcome.