Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 691844 - app-emulation/docker-19.03.1: breaks because legacy cgroupv1 hierarchy is unavailable.
Summary: app-emulation/docker-19.03.1: breaks because legacy cgroupv1 hierarchy is una...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
: 692040 700726 (view as bug list)
Depends on:
Blocks: 691310
  Show dependency tree
 
Reported: 2019-08-09 15:34 UTC by Michael Schmid
Modified: 2020-01-27 21:31 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 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 Alexander Litvinov 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.