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.0] Make cgroup freezer only care about current control group #3085

Merged
merged 2 commits into from
Jul 14, 2021

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Jul 12, 2021

This is a backport of PR #3081 to 1.0.

Fixes the issue (frozen containers) that led to runc bump to 1.0.0 reverted in kubernetes.

See also: #3065.

Changelog entry

Bugfixes:
* cgroupv1/systemd: fix freezing cgroup after Set if a parent cgroup is frozen (#3085)

@kolyshkin kolyshkin added this to the 1.0.1 milestone Jul 12, 2021
@kolyshkin kolyshkin changed the base branch from master to release-1.0 July 12, 2021 08:59
@kolyshkin kolyshkin changed the title [1.0] [1.0] Make cgroup freezer only care about current control group Jul 12, 2021
odinuge and others added 2 commits July 12, 2021 02:02
If a control group is frozen, all its descendants will report FROZEN
in freezer.state cgroup file.

OTOH cgroup v2 cgroup.freeze is not reporting the cgroup as frozen
unless it is frozen directly (i.e. not via an ancestor).

Fix the discrepancy between v1 and v2 drivers behavior by
looking into freezer.self_freezing cgroup file, which, according
to kernel documentation, will show 1 iff the cgroup was frozen directly.

Co-authored-by: Kir Kolyshkin <[email protected]>
Signed-off-by: Odin Ugedal <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 294c486)
Signed-off-by: Kir Kolyshkin <[email protected]>
This test the issues fixed by the two preceding commits.

Co-Authored-By: Kir Kolyshkin <[email protected]>
Signed-off-by: Odin Ugedal <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 3e5c199)
Signed-off-by: Kir Kolyshkin <[email protected]>
@cyphar
Copy link
Member

cyphar commented Jul 13, 2021

Ah, we need to add the 2-LGTM require rule to release-1.0 since it's not a protected branch...

Copy link
Member

@cyphar cyphar left a comment

Choose a reason for hiding this comment

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

LGTM.

@cyphar cyphar merged commit 4f88ed6 into opencontainers:release-1.0 Jul 14, 2021
@cyphar cyphar added the backport/1.0-pr A backport PR to release-1.0 label Jul 15, 2021
breakings added a commit to breakings/packages that referenced this pull request Aug 8, 2021
This is the first stable release in the 1.0 branch, fixing a few medium
and high priority issues with runc 1.0.0, including a few that affect
Kubernetes' usage of libcontainer.

Bugfixes:

- Fixed occasional runc exec/run failure ("interrupted system call") on an
  Azure volume. ([#3074](opencontainers/runc#3074))
- Fixed "unable to find groups ... token too long" error with /etc/group
  containing lines longer than 64K characters. ([#3079](opencontainers/runc#3079))
- cgroup/systemd/v1: fix leaving cgroup frozen after Set if a parent cgroup is
  frozen. This is a regression in 1.0.0, not affecting runc itself but some
  of libcontainer users (e.g Kubernetes). ([#3085](opencontainers/runc#3085))
- cgroupv2: bpf: Ignore inaccessible existing programs in case of
  permission error when handling replacement of existing bpf cgroup
  programs. This fixes a regression in 1.0.0, where some SELinux
  policies would block runc from being able to run entirely. ([#3087](opencontainers/runc#3087))
- cgroup/systemd/v2: don't freeze cgroup on Set. ([#3092](opencontainers/runc#3092))
- cgroup/systemd/v1: avoid unnecessary freeze on Set. ([#3093](opencontainers/runc#3093))
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.

4 participants