-
Notifications
You must be signed in to change notification settings - Fork 18.9k
do not create init-dir if not needed #29846
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
daemon/daemon_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.
This recursive call confused me; not sure if that was needed, but perhaps I misunderstood 😊
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.
I think the recursion is needed because all of the parents have to have a value <= than the targeted one in the path for this to work if I'm not mistaken
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.
Oh, right, so a cgroup has to be created at every level if it doesn't exist? (I don't think this function actually checks it's values, only creates)
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.
Yes, from what I could gather from the original code.
Also, reading the original PR, the following is in the description:
You will also need to ensure that the system and all parent cgroups have values set for the period and runtime as this limits what the children can be set to.
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.
I added back the recursive call, but moved it after the new checks
|
I can confirm that this fixes #29833 |
|
Thanks @lrusak! Now we need to check if it still does everything that it needs to do 😊 not too familiar with this part, so I'm awaiting some reviews 😄 |
commit 56f77d5 added support for cpu-rt-period and cpu-rt-runtime, but always initialized the cgroup path, even if not used. As a result, containers failed to start on a read-only filesystem. This patch only creates the cgroup path if one of these options is set. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
a4554d4 to
f285d5b
Compare
mlaventure
left a comment
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.
LGTM
TestSwarmContainerAutoStart seems to still be flaky unfortunately.
LK4D4
left a comment
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.
LGTM
|
Can this go in for 1.13 as a bug fix? |
|
We've frozen 1.13.0 rc's to only add critical issues, but if there's a patch release for 1.13, i'll bring this up for consideration |
fixes #29833
Commit 56f77d5 (#23430) added support for cpu-rt-period and cpu-rt-runtime, but always initialized the cgroup path, even if not used.
As a result, containers failed to start on a read-only filesystem.
This patch only creates the cgroup path if one of these options is set.
ping @erikstmartin @mlaventure PTAL. I think this should still do all that's required, but please double check.