Skip to content
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

[1.1] libct/cg/sd/v2: fix ENOENT on cgroup delegation #3404

Merged
merged 1 commit into from Mar 10, 2022

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Mar 8, 2022

Backport of #3389 to 1.1. Original description follows.


Apparently, not all files listed in /sys/kernel/cgroup/delegate must
exist in every cgroup, so we should ignore ENOENT.

Dot not ignore ENOENT on the directory itself though.

Change cgroupFilesToChown to not return ., and refactor it to not do
any dynamic slice appending in case we're using the default built-in
list of files.

Fixes: 35d20c4

@kolyshkin kolyshkin added this to the 1.1.1 milestone Mar 8, 2022
@kolyshkin kolyshkin changed the title libct/cg/sd/v2: fix ENOENT on cgroup delegation [1.1] libct/cg/sd/v2: fix ENOENT on cgroup delegation Mar 8, 2022
Apparently, not all files listed in /sys/kernel/cgroup/delegate must
exist in every cgroup, so we should ignore ENOENT.

Dot not ignore ENOENT on the directory itself though.

Change cgroupFilesToChown to not return ".", and refactor it to not do
any dynamic slice appending in case we're using the default built-in
list of files.

Fixes: 35d20c4
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 8c04b98)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Contributor Author

kolyshkin commented Mar 8, 2022

Hmm, apparently the "update with rebase" is working, with all LGTMs left intact, so I have enabled this option for all PRs. See #3407

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@thaJeztah thaJeztah merged commit a3765fb into opencontainers:release-1.1 Mar 10, 2022
@kolyshkin kolyshkin mentioned this pull request Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants