Skip to content

ci: ensure the cgroup parent always exists for rootless#5017

Merged
cyphar merged 1 commit intoopencontainers:mainfrom
lifubang:almalinux8
Nov 19, 2025
Merged

ci: ensure the cgroup parent always exists for rootless#5017
cyphar merged 1 commit intoopencontainers:mainfrom
lifubang:almalinux8

Conversation

@lifubang
Copy link
Copy Markdown
Member

@lifubang lifubang commented Nov 16, 2025

On some systems (e.g., AlmaLinux 8), systemd automatically removes cgroup paths
when they become empty (i.e., contain no processes). To prevent this, we spawn
a dummy process to pin the cgroup in place.
Fix: #5003

@lifubang lifubang force-pushed the almalinux8 branch 12 times, most recently from ea8be22 to 16de647 Compare November 16, 2025 13:02
@lifubang lifubang changed the title [DNM] ci: run localrootlessintegration first for almalinux8 CI: Ensure the cgroup parent always exists Nov 16, 2025
Comment on lines +103 to +104
sleep inf &
SID=$!
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be nice to have a (short) comment explaining what this is for, and SID should be a little more descriptive like CGROUP_PIN_PID or something.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Commit description could also use some of the explanation you added in #5003.

@lifubang lifubang changed the title CI: Ensure the cgroup parent always exists ci: ensure the cgroup parent always exists for rootless Nov 17, 2025
@AkihiroSuda AkihiroSuda added backport/1.3-todo A PR in main branch which needs to be backported to release-1.3 backport/1.4-todo A PR in main branch which needs to backported to release-1.4 area/cgroupv1 labels Nov 18, 2025
# a dummy process to pin the cgroup in place.
# See: https://github.com/opencontainers/runc/issues/5003
sleep inf &
CGROUP_PIN_PID=$!
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably this should be set only on cgroup v1

On some systems (e.g., AlmaLinux 8), systemd automatically removes cgroup paths
when they become empty (i.e., contain no processes). To prevent this, we spawn
a dummy process to pin the cgroup in place.
Fix: opencontainers#5003

Signed-off-by: lifubang <lifubang@acmcoder.com>
@lifubang lifubang added the backport/1.2-todo A PR in main branch which needs to be backported to release-1.2 label Nov 19, 2025
@lifubang lifubang mentioned this pull request Nov 19, 2025
Copy link
Copy Markdown
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.

I still wonder what is causing this, but LGTM.

@cyphar cyphar merged commit 117d334 into opencontainers:main Nov 19, 2025
37 checks passed
@lifubang lifubang added backport/1.2-done A PR in main branch which has been backported to release-1.2 backport/1.3-done A PR in main branch which has been backported to release-1.3 backport/1.4-done A PR in main branch which has been backported to release-1.4 and removed backport/1.2-todo A PR in main branch which needs to be backported to release-1.2 backport/1.3-todo A PR in main branch which needs to be backported to release-1.3 backport/1.4-todo A PR in main branch which needs to backported to release-1.4 labels Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cgroupv1 area/ci backport/1.2-done A PR in main branch which has been backported to release-1.2 backport/1.3-done A PR in main branch which has been backported to release-1.3 backport/1.4-done A PR in main branch which has been backported to release-1.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AlmaLinux 8 Broken Rootless Cgroup Tests?

3 participants