Manage cgroups configuration service and files.
- /etc/cgconfig.conf
- /etc/cgconfig.d/*.conf
This module has been tested to work on the following systems with Puppet v3 (with and without the future parser) and Puppet v4 (with strict variables) using Ruby versions 1.8.7 (Puppet v3 only), 1.9.3, 2.0.0, 2.1.0 and 2.3.1.
- EL 6
- EL 7
- SLED 11 SP2
- SLES 11 SP2
The cgroups
class is used to configure the cgroup service and its main configuration details.
Optional, specify arbitary content for the cgconfig.conf file that will be included at the bottom.
- Default: undef
Absolute path to cgroups config file.
- Default: '/etc/cgconfig.conf'
A hash containing group resources to be configured (see below for cgroups::group resources)
- Default: undef
cgroups::groups:
"user/mgw-all":
permissions:
task:
uid: root
gid: mgw-all
admin:
uid: root
gid: mgw-all
controllers:
cpuset:
"cpuset.mems": "0"
"cpuset.cpus": "0,1"
cgroups::user_path_fix: '/sys/fs/cgroup/user/mgw-all'
cgroups::groups:
"user/mgw-all":
permissions:
task:
uid: root
gid: mgw-all
admin:
uid: root
gid: mgw-all
controllers:
cpuset:
"cpuset.mems": "0"
"cpuset.cpus": "0,1"
A hash containing mounts to be configured in /etc/cgconfig.conf. NOTE: On systemd managed systems, the default resource controllers are the domain of systemd, therefore this setting should probably not be used unless you are managing a controller not yet supported by systemd such as net_prio.
- Default: undef
cgroups::mounts:
cpu: '/cgroup'
Name of package(s) that enables cgroups. Only set it to overwrite the modules defaults: RedHat 'libcgroup', Suse 'libcgroup1'.
- Default: undef
Name of service to manage.
- Default: 'cgconfig'
Absolute path to set 0775 permissions on when defined. This is a fix for Suse that have a bug in setting this though the config file. Only available on Suse.
- Default: undef
The cgroups::group
definition is used to configure cgroup entries in /etc/cgconfig.d.
You can also specify cgroups::groups
from hiera as a hash of group resources and they will be created by the base class using create_resources.
An optional hash containing the controllers for the group.
- Default: undef
controllers => {
'cpuset' => {
'cpuset.mems' => '0',
'cpuset.cpus' => '0,1'
}
}
An optional hash containing permissions for the group.
- Default: undef
permissions => {
'task' => {
'uid' => 'root',
'gid' => 'mgw-all',
},
'admin' => {
'uid' => 'root',
'gid' => 'mgw-all',
},
}
Optional parameter to define in which path the configuration file should be put. By default the module will use the /etc/cgconfig.d directory.
- Default: '/etc/cgconfig.d'
cggroups::group { 'mgw/user':
permissions => {
'task' => {
'uid' => 'root',
'gid' => 'mgw-all',
},
'admin' => {
'uid' => 'root',
'gid' => 'mgw-all',
},
},
controllers => {
'cpuset' => {
'cpuset.mems' => '0',
'cpuset.cpus' => '0,1'
}
}
}