Missing cgroupv2 for memory management

Calico node fails to start with “unified resource “memory.oom.group””

If during setup of a Kubernetes cluster (in this case it’s microk8s) on a Raspberry Pi 5 running Ubuntu Server 24.10 you get the following error

Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: unified resource “memory.oom.group” can’t be set: controller “memory” not available: unknown

during calico-node startup and can’t find a solution, fear not, I have a solution for you.

For unknown reason Control Group V2 memory module was not enabled. Kubernetes tries to use it by default and due to this conflict, Calico node (or any other as well) fails to start.

To verify if this is the case, run

cat /sys/fs/cgroup/cgroup.controllers

If memory module IS enabled, output will look something like this:

CGroupV2 memory module enable
cpuset cpu io memory hugetlb pids rdma misc dmem

If, however it’s not enabled, memory entry will be missing.

The solution for Raspberry Pi is to enable cgroup memory module. To do it edit cmdline.txt

sudo nano /boot/firmware/cmdline.txt 

and add

cgroup_enable=memory cgroup_memory=1

and the end of the line

cmdline.txt that enabled cgroupv2 memory module on Raspberry Pi

Then save, reboot

sudo reboot now

and it should work

cat /sys/fs/cgroup/cgroup.controllers
CGroupV2 memory module enable
calico node running without problems on kubernetes
kubernetess calico node working like expected after enabling cgroupv2 memory module



Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *