Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 691844

Summary: app-emulation/docker-19.03.1: breaks because legacy cgroupv1 hierarchy is unavailable.
Product: Gentoo Linux Reporter: Michael Schmid <meheschmid>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: RESOLVED FIXED    
Severity: normal CC: greenulito, harrisl, jdavid.ibp, jstein, leonchik1976, mrueg, skobkin-ru, ultrabug, vladykin, zlogene
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 691310    

Description Michael Schmid 2019-08-09 15:34:26 UTC
Docker appears to needs cgroupsv1, which is now disabled on systemd by default. 

As-is, the docker service then does not start with systemd, configuration detection with /usr/share/docker/contrib/check-config.sh also reports a failure. I personally saw no way to make docker use cgroupsv2. This seems to be exactly the same as Bug 691310 for libvirtd-lxc from which I took the summary description.

The same solution of requiring systemd[+cgroup-hybrid] works for me.
Comment 1 Mateusz Mandera 2019-08-13 00:51:00 UTC
For some reason, even with +cgroup-hybrid, check-config.sh reports failure:

Generally Necessary:
- cgroup hierarchy: nonexistent??
    (see https://github.com/tianon/cgroupfs-mount)

And dockerd doesn't start:

Aug 13 02:42:45 gentoo dockerd[8340]: failed to start daemon: Devices cgroup isn't mounted

Am I missing something?
Comment 2 Mateusz Mandera 2019-08-13 01:30:15 UTC
Disregard the above, it was an issue with my /usr/src/linux folder. It's working with +cgroup-hybrid.
Comment 3 Matthias Maier gentoo-dev 2019-08-13 05:47:45 UTC
*** Bug 692040 has been marked as a duplicate of this bug. ***
Comment 4 Matthias Maier gentoo-dev 2019-08-13 05:54:33 UTC
It would be best if app-emulation/docker would gain a

  !sys-apps/systemd[-cgroup-hybrid(+)]

dependency.
Comment 5 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-01-16 10:46:53 UTC
*** Bug 700726 has been marked as a duplicate of this bug. ***
Comment 6 Larry the Git Cow gentoo-dev 2020-01-16 19:36:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9753537cfaf24e80397a0236a169ded2ccc19fdf

commit 9753537cfaf24e80397a0236a169ded2ccc19fdf
Author:     Mikle Kolyada <zlogene@gentoo.org>
AuthorDate: 2020-01-16 19:36:09 +0000
Commit:     Mikle Kolyada <zlogene@gentoo.org>
CommitDate: 2020-01-16 19:36:09 +0000

    app-emulation/docker: force cgroupv1 on systemd
    
    Closes: https://bugs.gentoo.org/691844
    Package-Manager: Portage-2.3.79, Repoman-2.3.16
    Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>

 app-emulation/docker/docker-19.03.5.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 7 Spica 2020-01-27 21:27:26 UTC
In order to switch to cgroup1 it is enough to print a message saying to pass systemd.unified_cgroup_hierarchy=0 via kernel command line.