n36
Posts: 3
Joined: Sat Jan 20, 2018 10:42 pm

enabling cgroup memory doesn't take effect

Sat Jan 20, 2018 10:57 pm

I'm trying to install Kubernetes and it recommends that I enable the memory cgroup.

Code: Select all

CGROUPS_MEMORY: missing
[preflight] Some fatal errors occurred:
	[ERROR SystemVerification]: missing cgroups: memory
I've looked around for quite some time on the forums and found the usual suggestions to add it to /boot/cmdline.txt for the kernel. I made sure to also add it before elevator=deadline as I have also seen mentioned. For some reason though it's not enabled after reboot. I see it as part of the kernel command line during boot, but I also see it says later it's disabling the memory control group. Not sure if this is related, but could be why. Any suggestions for enabling the memory cgroup? Thanks!

Code: Select all

[    0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=c828357a-02 rootfstype=ext4 cgroup_enable=cpuset cgroup_enable=memory elevator=deadline fsck.repair=yes rootwait
[    0.002732] Disabling memory control group subsystem
 

Code: Select all

$ cat /proc/cgroups
#subsys_name	hierarchy	num_cgroups	enabled
cpuset	4	1	1
cpu	3	49	1
cpuacct	3	49	1
blkio	6	49	1
memory	0	1	0
devices	7	49	1
freezer	5	1	1
net_cls	2	1	1
Linux 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux
Description: Raspbian GNU/Linux 9.3 (stretch)

n36
Posts: 3
Joined: Sat Jan 20, 2018 10:42 pm

Re: enabling cgroup memory doesn't take effect

Sun Jan 21, 2018 4:05 pm

Everything seems to be enabled

Code: Select all

zgrep -i cgroup /proc/config.gz
CONFIG_CGROUPS=y
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
CONFIG_CGROUP_WRITEBACK=y
CONFIG_CGROUP_SCHED=y
# CONFIG_CGROUP_PIDS is not set
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
# CONFIG_CGROUP_PERF is not set
# CONFIG_CGROUP_DEBUG is not set
# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set
CONFIG_NET_CLS_CGROUP=m
CONFIG_SOCK_CGROUP_DATA=y
# CONFIG_CGROUP_NET_PRIO is not set
CONFIG_CGROUP_NET_CLASSID=y
I have tried manually mounting the memory cgroup, but it's saying I need the mount point to exist first. Any other way to force the memory cgroup to be enabled?

Code: Select all

sudo mount -t cgroup -o memory cgroup_memory /sys/fs/cgroup/memory
mount: mount point /sys/fs/cgroup/memory does not exist

n36
Posts: 3
Joined: Sat Jan 20, 2018 10:42 pm

Re: enabling cgroup memory doesn't take effect

Sun Jan 21, 2018 11:01 pm

Finally resolved the issue! I needed both cgroup_enable=memory AND cgroup_memory=1 in /boot/cmdline.txt

nskbidev
Posts: 1
Joined: Sun May 06, 2018 2:10 pm

Re: enabling cgroup memory doesn't take effect

Sun May 06, 2018 2:18 pm

Hello everyone.

I have changed /boot/cmdline.txt and added this

Code: Select all

cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
But I have still this error:
[ERROR SystemVerification]: missing cgroups: memory

logophage
Posts: 1
Joined: Tue May 15, 2018 9:53 pm

Re: enabling cgroup memory doesn't take effect

Tue May 15, 2018 10:16 pm

I've just had similar problems (Raspbian Stretch 9.4, kernel 4.14.34-v7+), but cgroup_enable=memory worked for me.

Full contents of my /boot/cmdline.txt are:

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=66b0b034-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait cgroup_enable=cpuset cgroup_enable=memory
Hope it helps.

tser04
Posts: 1
Joined: Fri Oct 19, 2018 8:10 pm

Re: enabling cgroup memory doesn't take effect

Fri Oct 19, 2018 8:14 pm

Reboot is required - I struggled a lot with same issues even after adding the cgroup_enable=1 item to cmdline.txt - But a reboot did the trick....

mindovermiles262
Posts: 2
Joined: Fri Jan 12, 2018 4:23 pm

Re: enabling cgroup memory doesn't take effect

Sat Jan 11, 2020 5:33 am

I just experienced this issue when trying to run `kubeadm init` on my Pi 3B.

I couldn't find the `cmdline.txt` file on Ubuntu 19.10 server. I looked through the `/boot/firmware` directory and saw `config.txt`

Code: Select all


[ ... snip ... ]
enable_uart=1
cmdline=nobtcmd.txt
it looks like the cmdline is being imported from `nobtcmd.txt`. I added `cgroup_enable=cpu cgroup_enable=memory` to the end of the line in that file, rebooted, and my kubeadm command ran fine.

Jimboboliath
Posts: 2
Joined: Mon Aug 03, 2020 10:38 am

Re: enabling cgroup memory doesn't take effect

Mon Aug 03, 2020 10:41 am

Hello,

I have the following /boot/cmdline.txt but still am having issues installing kubes on a Pi3b running the latest raspberry PI OS

Code: Select all

console=serial0,115200 console=tty1 root=PARTUUID=5d9cf613-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1

Code: Select all

cat /proc/cgroups

#subsys_name    hierarchy       num_cgroups     enabled
cpuset  6       1       1
cpu     3       33      1
cpuacct 3       33      1
devices 4       33      1
freezer 2       1       1
net_cls 7       1       1
pids    5       37      1

kubeadm still giving me 'CGROUPS_MEMORY: missing' AND 'CONFIG_MEMCG: not set'

Code: Select all

KERNEL_VERSION: 5.4.51-v7+
CONFIG_NAMESPACES: enabled
CONFIG_NET_NS: enabled
CONFIG_PID_NS: enabled
CONFIG_IPC_NS: enabled
CONFIG_UTS_NS: enabled
CONFIG_CGROUPS: enabled
CONFIG_CGROUP_CPUACCT: enabled
CONFIG_CGROUP_DEVICE: enabled
CONFIG_CGROUP_FREEZER: enabled
CONFIG_CGROUP_SCHED: enabled
CONFIG_CPUSETS: enabled
CONFIG_MEMCG: not set
CONFIG_INET: enabled
CONFIG_EXT4_FS: enabled
CONFIG_PROC_FS: enabled
CONFIG_NETFILTER_XT_TARGET_REDIRECT: enabled (as module)
CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled (as module)
CONFIG_OVERLAY_FS: enabled (as module)
CONFIG_AUFS_FS: not set - Required for aufs.
CONFIG_BLK_DEV_DM: enabled (as module)
DOCKER_VERSION: 19.03.12
DOCKER_GRAPH_DRIVER: overlay2
OS: Linux
CGROUPS_CPU: enabled
CGROUPS_CPUACCT: enabled
CGROUPS_CPUSET: enabled
CGROUPS_DEVICES: enabled
CGROUPS_FREEZER: enabled
CGROUPS_MEMORY: missing


ccokee
Posts: 1
Joined: Sun Nov 22, 2020 7:07 pm

Re: enabling cgroup memory doesn't take effect

Sun Nov 22, 2020 7:13 pm

Hi. Im currently having this issue.

My kernel config has the correct parms for CGROUP and I've applied all the fixes seen here but kubeadm still complains about CONFIG_MEMCG not set.

Code: Select all

cK00 /home/coke # cat /proc/cgroups | column -t
#subsys_name  hierarchy  num_cgroups  enabled
cpuset        2          1            1
cpu           3          1            1
cpuacct       4          1            1
blkio         5          1            1
memory        6          1            1
devices       7          1            1
freezer       8          1            1
net_cls       9          1            1
perf_event    10         1            1
net_prio      11         1            1
hugetlb       12         1            1
pids          13         1            1


Return to “Raspberry Pi OS”