Cgroup Version Configuration¶
The system uses cgroup v2 (the unified hierarchy) by default. This is the
recommended configuration, as Kubernetes deprecated support for cgroup v1 in
Kubernetes 1.35, with complete removal planned for a future version of Kubernetes.
Additionally, the Debian Trixie base operating system uses the unified cgroup
hierarchy by default.
Note
Cgroup v1 is deprecated and will be removed in a future release. It is recommended to use the default cgroup v2 configuration.
Comparison Between cgroup v1 and cgroup v2¶
Property |
Cgroup v1 |
Cgroup v2 |
|---|---|---|
File System |
tmpfs |
cgroup2fs |
Driver Kubelet |
cgroupfs |
systemd |
CGroup Root kubelet |
/k8sinfra (in StX r13 version) /k8s-infra (before StX r13 version) |
/k8sinfra |
SystemdCgroup container |
false |
true |
Switch Between Cgroup v2 and Cgroup v1¶
The cgroup_v2_enabled service parameter controls whether the system uses cgroup
v1 or cgroup v2.
By default, the system uses cgroup v2. No additional configuration is required
during installation to enable cgroup v2. To use cgroup v1, set the
cgroup_v2_enabled service parameter to false.
The cgroup version can be configured either before installation or after installation.
Before Installation¶
To install the system with cgroup v1 instead of the default cgroup v2, specify
the following in the deployment configuration file:
serviceParameters:
- service: platform
section: config
paramname: cgroup_v2_enabled
paramvalue: "false"
After Installation¶
To switch between cgroup versions after installation, update the
cgroup_v2_enabled service parameter to:
true– Enablescgroup v2(default)false– Enablescgroup v1
Switch Cgroup for AIO-SX Deployments¶
To switch the cgroup version on an AIO-SX deployment, perform the following steps:
Lock host.
~(keystone_admin)]$ system host-lock controller-0
Update the
cgroup_v2_enabledservice parameter value.~(keystone_admin)]$ system service-parameter-modify platform config cgroup_v2_enabled=<true|false>
Apply the updated service parameter.
~(keystone_admin)]$ system service-parameter-apply platform
Unlock host.
~(keystone_admin)]$ system host-unlock controller-0
Switch Cgroup For Multi-node Deployments¶
To switch the cgroup version on an AIO-DX standard and other deployments, perform the following steps:
Lock controller-0.
~(keystone_admin)]$ system host-lock controller-0
Update the
cgroup_v2_enabledservice parameter value.~(keystone_admin)]$ system service-parameter-modify platform config cgroup_v2_enabled=<true|false>
Apply the updated service parameter.
~(keystone_admin)]$ system service-parameter-apply platform
Unlock host.
~(keystone_admin)]$ system host-unlock controller-0
Swact controller-1.
~(keystone_admin)]$ system host-swact controller-0
On controller-1 and any worker nodes, lock the host, apply the updated service parameter, and unlock the host one node at a time (<hostname>).
~(keystone_admin)]$ system host-lock worker-0
~(keystone_admin)]$ system service-parameter-apply platform
~(keystone_admin)]$ system host-unlock worker-0
Backup and Restore¶
If a backup and restore is performed, after unlocking the host during a restore operation, the system is configured to the cgroup version that was in use at the time of the backup.