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
1.6.x inside a Docker container fails to run containers (cannot enter cgroupv2 "/sys/fs/cgroup/default" with domain controllers -- it is in an invalid state
)
#6659
Comments
Sorry, forgot to mention that this is on Edit:
Edit 2x: Docker host details: (although I'm not convinced these are actually relevant, especially since 1.5.x works fine)
|
cannot enter cgroupv2 "/sys/fs/cgroup/default" with domain controllers -- it is in an invalid state
)
Please provide Dockerfile, and also please make sure you have this https://github.com/moby/moby/blob/38805f20f9bcc5e87869d6c79d432b166e1c88b4/hack/dind#L28-L38 # cgroup v2: enable nesting
if [ -f /sys/fs/cgroup/cgroup.controllers ]; then
# move the processes from the root group to the /init group,
# otherwise writing subtree_control fails with EBUSY.
# An error during moving non-existent process (i.e., "cat") is ignored.
mkdir -p /sys/fs/cgroup/init
xargs -rn1 < /sys/fs/cgroup/cgroup.procs > /sys/fs/cgroup/init/cgroup.procs || :
# enable controllers
sed -e 's/ / +/g' -e 's/^/+/' < /sys/fs/cgroup/cgroup.controllers \
> /sys/fs/cgroup/cgroup.subtree_control
fi |
Ahhhhhhh, now I feel silly -- that's exactly what I was missing. Thank you, @AkihiroSuda! Hopefully this can stand as a helpful reminder to the next poor sucker who tries to do this and fails with a similar error message. 😄 😇 🙈 |
I have a similar issue, however I am trying to start rootless dockerd and a containter within a manually created network and cgroup namespace. I enter using I then get another shell the same way as above, to start a container. I get a long error like this: I tried the above script, running it inside my namespace as root however the init/cgroup.procs apparently does not exist when you try to write to it. I can see it with ls. But if I try to echo anything into it, or write to it with nano I get |
Description
On 1.5.x (with either of
runc
1.0.3 or 1.1.0) I can successfully run a Docker container with--privileged
and/var/lib/containerd
on a volume, runcontainerd
inside, and run containers on thatcontainerd
instance without issue.On 1.6.x (again, with either recent
runc
version) I get the following error when I try to run a container:Steps to reproduce the issue
containerd
+runc
desireddocker run --name test --privileged --volume /var/lib/containerd your-docker-image containerd
(feel free to use the
tianon/containerd:1.6.1
ortianon/containerd:1.5.10
images if you do not want to build your own)docker exec -it test bash -c 'ctr image pull docker.io/library/bash:latest && ctr run -t --rm docker.io/library/bash:latest test'
Describe the results you received and expected
Expected:
Recevied:
What version of containerd are you using?
containerd github.com/containerd/containerd v1.6.1 10f428d
Any other relevant information
I originally thought this was somehow related to opencontainers/runc#3387, but I'm a lot less sure of that now.
Show configuration if it is related to CRI plugin.
No response
The text was updated successfully, but these errors were encountered: