K3s: Ubuntu for IoT failed to find memory cgroup

Created on 14 Nov 2019  路  12Comments  路  Source: k3s-io/k3s

Version:
k3s version v0.9.1

Describe the bug
I am not running a Raspberry Pi4 ubunut for iot.

config cgroup not working

$ vim /boot/cmdline.txt
# text
dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rootflags=noload net.ifnames=0 cgroup_memory=1 cgroup_enable=memory

console output

INFO[2019-11-14T18:15:28.309895304Z] Wrote kubeconfig /etc/rancher/k3s/k3s.yaml
INFO[2019-11-14T18:15:28.310050786Z] Run: k3s kubectl
INFO[2019-11-14T18:15:28.310106363Z] k3s is up and running
ERRO[2019-11-14T18:15:28.310530982Z] 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)
FATA[2019-11-14T18:15:28.310661410Z] 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)

To Reproduce
Run sudo k3s server on ubunut for iot

Expected behavior
k3s starts successfully and continues to run

Additional context
Running ubunut for iot

Unscheduled

Most helpful comment

Thanks @zimme!!

the path for (ubuntu-19.10-preinstalled-server-+raspi3) is
/boot/firmware/nobtcmd.txt

thnx you both
the path for (ubuntu-20.04-preinstalled-server-arm64+raspi) is
'/boot/firmware/cmdline.txt'

All 12 comments

Thanks for the info!

Would you mine sharing the output of:

curl -sfL https://raw.githubusercontent.com/rancher/k3s/master/contrib/util/check-config.sh | sh -

It you're running ubuntu server (ubuntu-19.10-preinstalled-server-+raspi3) I believe the correct file to update the cmdline is either nobtcmd.txt (default) or btcmd.txt (if you changed the config to enabled bluetooth).

You can run cat /proc/cmdline to see the cmdline of the running system to verify that cgroup_memory stuff is actually used.

@erikwilson Thank you

Thanks @zimme!!

the path for (ubuntu-19.10-preinstalled-server-+raspi3) is
/boot/firmware/nobtcmd.txt

Can this be closed now or is there anything else needed?

I have to say this answer was hard to find. Had issues with RKE and k3s installs on pi's ubuntu 18.04 64 bit arm builds.

For raspberry pi 4 the file to be edited is /boot/firmware/nobtcmd.txt

For the record, I think you're actually supposed to edit /etc/default/flash-kernel:

sysadm@pi01:~$ cat /etc/default/flash-kernel
LINUX_KERNEL_CMDLINE="apparmor=0 mitigations=off cgroup_memory=1 cgroup_enable=memory max_loop=32"
LINUX_KERNEL_CMDLINE_DEFAULTS=""

Thanks @zimme!!

the path for (ubuntu-19.10-preinstalled-server-+raspi3) is
/boot/firmware/nobtcmd.txt

thnx you both
the path for (ubuntu-20.04-preinstalled-server-arm64+raspi) is
'/boot/firmware/cmdline.txt'

The stuff in /boot/firmware/cmdline.txt is merged with the contents of /etc/default/flash-kernel. I don't know what the point of that is other than letting you easily edit the boot options for a broken system by sticking the card in a Windows PC.

on ubuntu 20.04, /etc/default/flash-kernel didn't seem to work for me. Adding to boot/firmware/cmdline.txt did.

Was this page helpful?
0 / 5 - 0 ratings