Skip to content

[1.1] libct/cg/sd/v1: do not update non-frozen cgroup after frozen failed.#3921

Merged
lifubang merged 1 commit intoopencontainers:release-1.1from
jiusanzhou:1.1-bugfix/skip-update-while-frozen-faield
Jul 16, 2023
Merged

[1.1] libct/cg/sd/v1: do not update non-frozen cgroup after frozen failed.#3921
lifubang merged 1 commit intoopencontainers:release-1.1from
jiusanzhou:1.1-bugfix/skip-update-while-frozen-faield

Conversation

@jiusanzhou
Copy link
Contributor

This is a backport of #3804 to release-1.1 branch. Original description follows.


In code we have frozen the cgroup to avoid the processes get an occasional "permission denied" error, while the systemd's application of device rules is done disruptively. When the processes in the container can not be frozen over 2 seconds (which defined in fs/freezer.go), we still update the cgroup which resulting the container get an occasional "permission denied" error in some cases.

Return error directly without updating cgroup, when freeze fails.

Fixes: #3803

In code we have frozen the cgroup to avoid the processes get
an occasional "permission denied" error, while the systemd's application of device
rules is done disruptively. When the processes in the container can not
be frozen over 2 seconds (which defined in fs/freezer.go),
we still update the cgroup which resulting the container get an occasional
"permission denied" error in some cases.

Return error directly without updating cgroup, when freeze fails.

Fixes: opencontainers#3803

Signed-off-by: Zoe <hi@zoe.im>
@jiusanzhou
Copy link
Contributor Author

@kolyshkin PTAL

@kolyshkin kolyshkin requested a review from AkihiroSuda July 7, 2023 00:40
@kolyshkin kolyshkin added this to the 1.1.8 milestone Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants