-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
In a cgroup2 enviroment, runing a container in a container failed. #10083
Comments
You have to set up controllers like this |
@AkihiroSuda Yes, I can manually add controllers, but I wonder if containerd should automatically add the parent cgroup's controllers when starting a container? It seems more logical this way. Alos, should containerd also provide an interface to define the container's sub-controllers on the cgroup2 system? I think the default behavior for starting a container is to add all parent cgroup controllers. Providing a flag to customize the cgroup seems like a better option. |
Description
On the enviroment of a cgroupv2 host, running a container within a container failed.
Steps to reproduce the issue
Describe the results you received and expected
I believe this is causing the failure to start a container within a container:
https://github.com/containerd/cgroups/blob/main/cgroup2/manager.go#L312
The container started on the host does not have the parent controllers inherited in the final cgroup.subtree_control. As a result, when a container is launched within the parent container, the child container's cgroup does not have any controllers.
What version of containerd are you using?
1.7.6
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
The text was updated successfully, but these errors were encountered: