Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Ensure all parent dirs are properly setup #642

Merged
merged 1 commit into from
Jun 19, 2015

Conversation

crosbymichael
Copy link
Contributor

Even if libcontainer does not create the directories for the cpuset
cgroup we should ensure that they are properly populated with the
parent's cpus and mems values. Some systems create the directory
structures but do not correctly populate the values and causes our
implementation to fail.

The change in this code is that instead of stopping when we find the first parent directory in cpuset, we keep moving up the hierarchy until we hit the root of the cpuset cgroup to ensure that every parent is correctly created.

Signed-off-by: Michael Crosby crosbymichael@gmail.com

@@ -87,19 +87,14 @@ func (s *CpusetGroup) getSubsystemSettings(parent string) (cpus []byte, mems []b
// ensureParent ensures that the parent directory of current is created
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably comment needs updating.

Even if libcontainer does not create the directories for the cpuset
cgroup we should ensure that they are properly populated with the
parent's cpus and mems values.  Some systems create the directory
structures but do not correctly populate the values and causes our
implementation to fail.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
@calavera
Copy link

LGTM

1 similar comment
@LK4D4
Copy link
Contributor

LK4D4 commented Jun 19, 2015

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants