kairos icon indicating copy to clipboard operation
kairos copied to clipboard

cgroup_memory not mounted in Alpine rpi4

Open jimmykarily opened this issue 1 year ago • 3 comments

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.

jimmykarily avatar Nov 13 '23 09:11 jimmykarily

Let's check if all Alpine standard images face this issue (not only rpi) so that we can prioritize.

jimmykarily avatar Nov 13 '23 09:11 jimmykarily

The issue only affects RPi

mauromorales avatar Nov 14 '23 10:11 mauromorales

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)

mauromorales avatar Jan 10 '24 20:01 mauromorales

issue still present in v3.1.0

mauromorales avatar Jul 11 '24 12:07 mauromorales

Looks like this is specific of the rpi kernel

we need to add cgroup_enable=memory to the default rpi cmdline for alpine+rpi

Itxaka avatar Jul 12 '24 06:07 Itxaka