Gentoo Archives: gentoo-user

From: Andrew Udvare <audvare@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Docker + systemd since cgroups v2
Date: Tue, 10 Sep 2019 14:12:22
Message-Id: ADFA6D34-D114-4F39-95E5-9FC4FB0F6526@gmail.com
1 For reference: uname -r: 5.2.13-gentoo, systemd version 243_rc2-r1[cgroup-hybrid], ACCEPT_KEYWORDS="~amd64"
2
3 My system started failing to start running docker.service automatically and the logs weren't too helpful. Finally I ran dockerd on its own and found that it gave me this error message:
4
5 Devices cgroup isn't mounted
6
7 This is not too easy to diagnose as there seem to be a set of solutions but none of the main two worked for me. One involved setting 2 options on the kernel command line:
8
9 cgroup_enable=memory swapaccount=1
10
11 And the other was to add USE="cgroup-hybrid" to systemd. I did this, but it too it did not work.
12
13 The other solution is to simply mount the cgroup manually and this works but I did not see why I'd have to do that now when I never had to in the past.
14
15 I actually had to add this to my command line:
16
17 systemd.legacy_systemd_cgroup_controller=yes
18
19 This has been noted in other distros but from what I can tell this is solely because runc has not been updated to be able to use cgroups v2.
20
21 Anyone else ran into this issue? Is there something I am missing so I wouldn't need to pass a kernel command line option?
22
23 Reference links:
24
25 https://docs.docker.com/install/linux/linux-postinstall/#your-kernel-does-not-support-cgroup-swap-limit-capabilities
26 https://github.com/opencontainers/runc/issues/654
27 https://github.com/opencontainers/runc/issues/1175
28 https://wiki.gentoo.org/wiki/Docker#Docker_service_fails_because_cgroup_device_not_mounted_.28systemd.29
29
30
31 --
32 Andrew Udvare

Replies

Subject Author
Re: [gentoo-user] Docker + systemd since cgroups v2 John Covici <covici@××××××××××.com>