Skip to content

Conversation

@LK4D4
Copy link
Contributor

@LK4D4 LK4D4 commented Jan 6, 2016

It's "/docker" for cgroupfs and "system.slice" for systemd.

Fix #19140

@mrunalp
Copy link
Contributor

mrunalp commented Jan 6, 2016

👍

@mrunalp
Copy link
Contributor

mrunalp commented Jan 6, 2016

I think this is cleaner as we process the parent at a higher level.

@calavera
Copy link
Contributor

calavera commented Jan 7, 2016

LGTM

Copy link
Contributor

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
        }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, thanks!

@hqhq
Copy link
Contributor

hqhq commented Jan 7, 2016

One minor tip in the comment, otherwise looks good.

@dqminh
Copy link
Contributor

dqminh commented Jan 7, 2016

LGTM

@LK4D4 LK4D4 added the priority/P1 Important: P1 issues are a top priority and a must-have for the next release. label Jan 7, 2016
Copy link
Contributor

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>
@LK4D4
Copy link
Contributor Author

LK4D4 commented Jan 7, 2016

@anusha-ragunathan Fixed!

@anusha-ragunathan
Copy link
Contributor

LGTM!

@thaJeztah
Copy link
Member

docs LGTM (feel free to merge if code is good, docs will still be enhanced separately)

jessfraz pushed a commit that referenced this pull request Jan 7, 2016
Choose default-cgroup parent by cgroup driver
@jessfraz jessfraz merged commit 938d28e into moby:master Jan 7, 2016
@jessfraz
Copy link
Contributor

jessfraz commented Jan 7, 2016

LGTM

@LK4D4 LK4D4 deleted the fix_parent_systemd branch January 7, 2016 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/P1 Important: P1 issues are a top priority and a must-have for the next release. status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants