Skip to content

Conversation

@michalsieron
Copy link
Contributor

On cgroup v1 it is possible to disable freezer subsystem. In such case freezer.state file won't be present. Due to the race condition handling in libcrun_get_container_state_string, missing freezer.state would be interpreted as cgroup being removed when check is being performed.

But as indicated earlier, that is not the case when it's cgroup v1 and the freezer is disabled. Therefore introduce logic that checks for that using type of the filesystem mounted under the freezer directory.

When freezer is disabled, container simply cannot be paused.

Fixes #1612

@michalsieron michalsieron force-pushed the no-cgroup-v1-freezer branch 2 times, most recently from e2b4c89 to 186ec99 Compare December 6, 2024 09:26
@kwilczynski
Copy link
Member

Nice.

@kwilczynski
Copy link
Member

/approve
/lgtm

On cgroup v1 it is possible to disable freezer subsystem. In such case
freezer.state file won't be present. Due to the race condition handling
in libcrun_get_container_state_string, missing freezer.state would be
interpreted as cgroup being removed when check is being performed.

But as indicated earlier, that is not the case when it's cgroup v1 and
the freezer is disabled. Therefore introduce logic that checks for that
using type of the filesystem mounted under the freezer directory.

When freezer is disabled, container simply cannot be paused.

Fixes containers#1612

Signed-off-by: Michal Sieron <[email protected]>
Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

I'll merge once the CI is green

@giuseppe giuseppe merged commit 1aac2ef into containers:main Dec 6, 2024
53 checks passed
@michalsieron michalsieron deleted the no-cgroup-v1-freezer branch December 6, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running container is reported as stopped when cgroup v1 is used and freezer is disabled

3 participants