Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker does not run with unified cgroup hierarchy #16238

Closed
xnox opened this issue Sep 11, 2015 · 15 comments · Fixed by #40174
Closed

Docker does not run with unified cgroup hierarchy #16238

xnox opened this issue Sep 11, 2015 · 15 comments · Fixed by #40174
Labels
area/cgroup2 cgroup v2 area/daemon area/kernel kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.

Comments

@xnox
Copy link
Contributor

xnox commented Sep 11, 2015

When booting system with systemd 226, with systemd.unified_cgroup_hierarchy option, docker with native & lxc drivers fail.

@orivej
Copy link

orivej commented Oct 5, 2015

+1
To reproduce (with Linux 3.16 or newer):

mkdir /sys/fs/cgroup/unified
mount -t cgroup -o __DEVEL__sane_behavior cgroup /sys/fs/cgroup/unified
docker run --rm busybox

Docker 1.8.1 prints:

Timestamp: 2015-10-05 19:44:19.240101459 +0000 UTC
Code: System error

Message: no subsystem for mount

Frames:
---
0: setupRootfs
Package: github.com/opencontainers/runc/libcontainer
File: rootfs_linux.go@37
---
1: Init
Package: github.com/opencontainers/runc/libcontainer.(*linuxStandardInit)
File: standard_init_linux.go@52
---
2: StartInitialization
Package: github.com/opencontainers/runc/libcontainer.(*LinuxFactory)
File: factory_linux.go@242
---
3: initializer
Package: github.com/docker/docker/daemon/execdriver/native
File: init.go@35
---
4: Init
Package: github.com/docker/docker/pkg/reexec
File: reexec.go@26
---
5: main
Package: main
File: docker.go@19
---
6: main
Package: runtime
File: proc.go@63
---
7: goexit
Package: Error response from daemon: Cannot start container e218e2e9e406121a1732013d1388648da84b31bc8ad5342bc6e5b73216a2f857: [8] System error: no subsystem for mount

@thaJeztah
Copy link
Member

also see #16256

@thaJeztah
Copy link
Member

@xnox we recently merged a PR to change the default to cgroupfs for docker 1.10, see #17704

@mrunalp
Copy link
Contributor

mrunalp commented Dec 17, 2015

@xnox We need to add support for this to runc/libcontainer before docker can support it.

@mrunalp
Copy link
Contributor

mrunalp commented Mar 17, 2016

@sols1 Thanks for the update. I think we will start adding support for it in runc first.

@mrunalp
Copy link
Contributor

mrunalp commented Mar 17, 2016

@sols1 Looks like some stuff is still missing, but we can start looking.

 Unfortunately, cpu v2 interface hasn't made it yet due to the discussion around in-process hierarchical resource distribution and only memory and io controllers can be used on the v2 interface at the moment.

@sols1
Copy link

sols1 commented Mar 17, 2016

Actually, I am not sure what exactly this mean because cgroup v2 (unified hierarchy) existed in kernel as experimental feature since 3.16 and it should include cpu v2 interface.

4.5 commit makes v2 official but still optional. In fact it is possible to mix and match: memory and io can be on v2 and cpu on v1.

@MikailBag
Copy link

What is current state of this issue?

@thaJeztah
Copy link
Member

Latest status can be found in opencontainers/runc#654

@fcelda
Copy link

fcelda commented Oct 23, 2019

Please, is there a single place where this feature is being tracked?

The opencontainers/runc#654 has been just closed but mentions there will be new tickets for the remaining tasks. Is runc the only component that needs work? What else needs to be done?

@AkihiroSuda
Copy link
Member

containerd needs to support cgroup2: containerd/cgroups#102

@xnox
Copy link
Contributor Author

xnox commented Nov 1, 2019

containerd needs to support cgroup2 moved on to containerd/cgroups#103 right?

@AkihiroSuda
Copy link
Member

yes

@AkihiroSuda
Copy link
Member

PR: #40174

@AkihiroSuda AkihiroSuda added the area/cgroup2 cgroup v2 label Jan 23, 2021
lguohan pushed a commit to sonic-net/sonic-buildimage that referenced this issue Apr 8, 2021
Fix #7180 

Update systemd to v247 in order to pick the fix for "core: coldplug possible nop_job" systemd/systemd#13124

Install systemd, systemd-sysv from buster-backports. Pass "systemd.unified_cgroup_hierarchy=0" as kernel argument to force systemd to not use unified cgroup hierarchy, otherwise dockerd won't start moby/moby#16238.
Also, chown $FILSYSTEM_ROOT for root, otherwise apt systemd installation complains, see similar https://unix.stackexchange.com/questions/593529/can-not-configure-systemd-inside-a-chrooted-environment

Signed-off-by: Stepan Blyschak <[email protected]>
yxieca pushed a commit to sonic-net/sonic-buildimage that referenced this issue Apr 8, 2021
Fix #7180 

Update systemd to v247 in order to pick the fix for "core: coldplug possible nop_job" systemd/systemd#13124

Install systemd, systemd-sysv from buster-backports. Pass "systemd.unified_cgroup_hierarchy=0" as kernel argument to force systemd to not use unified cgroup hierarchy, otherwise dockerd won't start moby/moby#16238.
Also, chown $FILSYSTEM_ROOT for root, otherwise apt systemd installation complains, see similar https://unix.stackexchange.com/questions/593529/can-not-configure-systemd-inside-a-chrooted-environment

Signed-off-by: Stepan Blyschak <[email protected]>
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this issue May 23, 2021
…#7228)

Fix sonic-net#7180 

Update systemd to v247 in order to pick the fix for "core: coldplug possible nop_job" systemd/systemd#13124

Install systemd, systemd-sysv from buster-backports. Pass "systemd.unified_cgroup_hierarchy=0" as kernel argument to force systemd to not use unified cgroup hierarchy, otherwise dockerd won't start moby/moby#16238.
Also, chown $FILSYSTEM_ROOT for root, otherwise apt systemd installation complains, see similar https://unix.stackexchange.com/questions/593529/can-not-configure-systemd-inside-a-chrooted-environment

Signed-off-by: Stepan Blyschak <[email protected]>
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this issue Aug 7, 2021
…#7228)

Fix sonic-net#7180 

Update systemd to v247 in order to pick the fix for "core: coldplug possible nop_job" systemd/systemd#13124

Install systemd, systemd-sysv from buster-backports. Pass "systemd.unified_cgroup_hierarchy=0" as kernel argument to force systemd to not use unified cgroup hierarchy, otherwise dockerd won't start moby/moby#16238.
Also, chown $FILSYSTEM_ROOT for root, otherwise apt systemd installation complains, see similar https://unix.stackexchange.com/questions/593529/can-not-configure-systemd-inside-a-chrooted-environment

Signed-off-by: Stepan Blyschak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cgroup2 cgroup v2 area/daemon area/kernel kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants