Choose default-cgroup parent by cgroup driver#19144
Merged
jessfraz merged 1 commit intomoby:masterfrom Jan 7, 2016
LK4D4:fix_parent_systemd
Merged
Choose default-cgroup parent by cgroup driver#19144jessfraz merged 1 commit intomoby:masterfrom LK4D4:fix_parent_systemd
jessfraz merged 1 commit intomoby:masterfrom
LK4D4:fix_parent_systemd
Conversation
Contributor
|
👍 |
Contributor
|
I think this is cleaner as we process the parent at a higher level. |
Contributor
|
LGTM |
Contributor
There was a problem hiding this comment.
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
}
Contributor
|
One minor tip in the comment, otherwise looks good. |
Contributor
|
LGTM |
daemon/container_operations_unix.go
Outdated
Contributor
There was a problem hiding this comment.
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 <[email protected]>
Contributor
Author
|
@anusha-ragunathan Fixed! |
Contributor
|
LGTM! |
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
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's "/docker" for cgroupfs and "system.slice" for systemd.
Fix #19140