kairos
kairos copied to clipboard
cgroup_memory not mounted in Alpine rpi4
With image quay.io/kairos/alpine:3.18-standard-arm64-rpi4-v2.4.2-rc2-k3sv1.28.2-k3s1-img
k3s doesn't start. The error is:
time="2023-11-08T17:10:53Z" level=fatal msg="failed to find memory cgroup, you may need to add \"cgroup_memory=1 cgroup_enable=memory\" to your linux cmdline (/boot/cmdline.txt on a Raspberry Pi)"
Add the suggested lines to the cmdline (by editing grub) makes it work. We can use the rpi cmdline.txt (or add it everywhere in alpine if it's an issue on non-rpi flavors too) to enable the memory cgroup.
Let's check if all Alpine standard images face this issue (not only rpi) so that we can prioritize.
The issue only affects RPi
The error is a little different in the latest release:
time="2024-01-10T19:59:29Z" level=info msg="Run: k3s kubectl"
time="2024-01-10T19:59:29Z" level=fatal msg="failed to find memory cgroup (v2)"
this is how the mount looks like
/home/kairos # mount | grep cgroup
none on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
issue still present in v3.1.0
Looks like this is specific of the rpi kernel
we need to add cgroup_enable=memory to the default rpi cmdline for alpine+rpi