Configuring the Linux cgroup version on your nodes
cgroup v2 is the next version of the kernel control group and offers multiple improvements. However, it can have some unwanted effects on your nodes.
You can switch to Linux control group version 1 (cgroup v1), if needed, by using a machine config. Enabling cgroup v1 in OKD disables the cgroup v2 controllers and hierarchies in your cluster.
Prerequisites
- Have administrative privilege to a working OKD cluster.
Procedure
Create the new machine config:
$ oc create -f 05-worker-cgroup-v1.yaml
Check to see that the new machine config was added:
Example output
Check the nodes:
$ oc get nodes
NAME STATUS ROLES AGE VERSION
ip-10-0-136-243.ec2.internal Ready master 34m v1.26.0
ip-10-0-141-105.ec2.internal Ready,SchedulingDisabled worker 28m v1.26.0
ip-10-0-153-11.ec2.internal Ready worker 28m v1.26.0
ip-10-0-153-150.ec2.internal Ready master 34m v1.26.0
You can see that the command disables scheduling on each worker node.
After a node returns to the state, start a debug session for that node:
Set
/host
as the root directory within the debug shell:sh-4.4# chroot /host
Check that the
sys/fs/cgroup/cgroup2fs
file has been moved to thetmpfs
file system: