systemd cgroup v1 freeze fixes #3080
Closed
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.
This is a combo of #3065 and #3072, fixing issues resulting in kubernetes revert of runc 1.0.0 vendoring.
Fix cgroup v1
GetFreezerStateto not report cgroup state as frozen if a parent cgroup is frozen.After the fix, we only report the cgroup is frozen if it is frozen directly (and not via an ancestor).
This is how cgroup v2 GetFreezerState works, so now there's no discrepancy between v1 and v2 behavior.
Fix cgroup/systemd v1 Set to not leave sub-cgroup frozen in case a parent cgroup is frozen.
This issue mostly stems from the
GetFreezerStatereporting incorrect state (fixed above).Cleanup cgroup/systemd v1 freeze/thaw code (do not overwrite cgroup resources freezer).
Avoid unnecessary freeze/thaw.
Tests for all the above issues.
Co-authored-by: @odinuge