-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Choose default-cgroup parent by cgroup driver #19144
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
Conversation
|
👍 |
|
I think this is cleaner as we process the parent at a higher level. |
|
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there is no point we set it to "/docker" here anymore, since we will always override it, and it feels wired to set Parent=/docker and ScopePrefix=docker in the same time and same place, because they will never work together.
What about just set Parent: "" here?
And one more comment need to be fixed:
diff --git a/daemon/execdriver/driver_unix.go b/daemon/execdriver/driver_unix.go
index eedd8ac..b2a3d30 100644
--- a/daemon/execdriver/driver_unix.go
+++ b/daemon/execdriver/driver_unix.go
@@ -150,7 +150,7 @@ func InitContainer(c *Command) *configs.Config {
// check to see if we are running in ramdisk to disable pivot root
container.NoPivotRoot = os.Getenv("DOCKER_RAMDISK") != ""
- // Default parent cgroup is "docker". Override if required.
+ // Override it if required.
if c.CgroupParent != "" {
container.Cgroups.Parent = c.CgroupParent
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, thanks!
|
One minor tip in the comment, otherwise looks good. |
|
LGTM |
daemon/container_operations_unix.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to perform case in-sensitive compare here like in NewDriver(). Rest LGTM.
It's "/docker" for cgroupfs and "system.slice" for systemd. Fix #19140 Signed-off-by: Alexander Morozov <lk4d4@docker.com>
|
@anusha-ragunathan Fixed! |
|
LGTM! |
|
docs LGTM (feel free to merge if code is good, docs will still be enhanced separately) |
Choose default-cgroup parent by cgroup driver
|
LGTM |
It's "/docker" for cgroupfs and "system.slice" for systemd.
Fix #19140