Gentoo Archives: gentoo-user

From: John Covici <covici@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Docker + systemd since cgroups v2
Date: Tue, 10 Sep 2019 17:25:26
Message-Id: m38sqwnjxn.wl-covici@ccs.covici.com
In Reply to: Re: [gentoo-user] Docker + systemd since cgroups v2 by John Covici
1 On Tue, 10 Sep 2019 12:00:07 -0400,
2 John Covici wrote:
3 >
4 > On Tue, 10 Sep 2019 10:12:08 -0400,
5 > Andrew Udvare wrote:
6 > >
7 > > For reference: uname -r: 5.2.13-gentoo, systemd version 243_rc2-r1[cgroup-hybrid], ACCEPT_KEYWORDS="~amd64"
8 > >
9 > > 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:
10 > >
11 > > Devices cgroup isn't mounted
12 > >
13 > > 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:
14 > >
15 > > cgroup_enable=memory swapaccount=1
16 > >
17 > > And the other was to add USE="cgroup-hybrid" to systemd. I did this, but it too it did not work.
18 > >
19 > > 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.
20 > >
21 > > I actually had to add this to my command line:
22 > >
23 > > systemd.legacy_systemd_cgroup_controller=yes
24 > >
25 > > 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.
26 > >
27 > > Anyone else ran into this issue? Is there something I am missing so I wouldn't need to pass a kernel command line option?
28 > >
29 > > Reference links:
30 > >
31 > > https://docs.docker.com/install/linux/linux-postinstall/#your-kernel-does-not-support-cgroup-swap-limit-capabilities
32 > > https://github.com/opencontainers/runc/issues/654
33 > > https://github.com/opencontainers/runc/issues/1175
34 > > https://wiki.gentoo.org/wiki/Docker#Docker_service_fails_because_cgroup_device_not_mounted_.28systemd.29
35 >
36 > I ran into this issue when going from 4.19.56 to 4.19.68 kernel.
37 > Perhaps I will try this option later on, but I wonder if we could file
38 > a bug with sgentoo or somewhere?
39
40 And furthermore its the same version of systemd 243_rc2 .
41
42 --
43 Your life is like a penny. You're going to lose it. The question is:
44 How do
45 you spend it?
46
47 John Covici wb2una
48 covici@××××××××××.com