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....

Return to “Raspbian”