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

Open
xnox opened this issue Sep 11, 2015 · 15 comments · May be fixed by #40174

Comments

@xnox
Copy link
Contributor

@xnox xnox commented Sep 11, 2015

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

@orivej

This comment has been minimized.

Copy link

@orivej 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

This comment has been minimized.

Copy link
Member

@thaJeztah thaJeztah commented Oct 19, 2015

also see #16256

@thaJeztah

This comment has been minimized.

Copy link
Member

@thaJeztah thaJeztah commented Dec 2, 2015

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

@mrunalp

This comment has been minimized.

Copy link
Contributor

@mrunalp mrunalp commented Dec 17, 2015

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

@sols1

This comment has been minimized.

Copy link

@sols1 sols1 commented Mar 17, 2016

cgroup v2 (unified hierarchy) is now official in 4.5:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34a9304a96d6351c2d35dcdc9293258378fc0bd8

cgroup v2 should have more sensible behavior:

https://www.youtube.com/watch?v=PzpG40WiEfM

Any plans to support it by docker?

@mrunalp

This comment has been minimized.

Copy link
Contributor

@mrunalp mrunalp commented Mar 17, 2016

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

@mrunalp

This comment has been minimized.

Copy link
Contributor

@mrunalp 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

This comment has been minimized.

Copy link

@sols1 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

This comment has been minimized.

Copy link

@MikailBag MikailBag commented Jan 30, 2019

What is current state of this issue?

@thaJeztah

This comment has been minimized.

Copy link
Member

@thaJeztah thaJeztah commented Jan 30, 2019

Latest status can be found in opencontainers/runc#654

@fcelda

This comment has been minimized.

Copy link

@fcelda 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

This comment has been minimized.

Copy link
Member

@AkihiroSuda AkihiroSuda commented Oct 26, 2019

containerd needs to support cgroup2: containerd/cgroups#102

@xnox

This comment has been minimized.

Copy link
Contributor Author

@xnox xnox commented Nov 1, 2019

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

@AkihiroSuda

This comment has been minimized.

Copy link
Member

@AkihiroSuda AkihiroSuda commented Nov 1, 2019

yes

@AkihiroSuda AkihiroSuda referenced a pull request that will close this issue Nov 5, 2019
@AkihiroSuda

This comment has been minimized.

Copy link
Member

@AkihiroSuda AkihiroSuda commented Nov 5, 2019

PR: #40174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.