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

fix: cgroups: check for systemd init when needed #3537

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

dtrudg
Copy link
Member

@dtrudg dtrudg commented Feb 20, 2025

Description of the Pull Request (PR):

When CanUseCgroups is called, with systemd as the intended cgroups manager, make sure that a systemd init is actually running.

This fixes flows where Singularity run nested inside another container, that doesn't provide a systemd init or mount the host /run directory into the container.

This fixes or addresses the following GitHub issues:

Before submitting a PR, make sure you have done the following:

@dtrudg dtrudg force-pushed the issue-3536 branch 3 times, most recently from 6a10bf8 to bc50829 Compare February 20, 2025 11:53
@dtrudg dtrudg self-assigned this Feb 20, 2025
@dtrudg dtrudg added this to the SingularityCE 4.3.0 milestone Feb 20, 2025
@dtrudg dtrudg changed the title fix: oci: don't use systemd cgroups with runc/crun if no systemd init fix: cgroups: check for systemd init when needed Feb 20, 2025
@dtrudg dtrudg marked this pull request as ready for review February 20, 2025 12:34
Copy link
Contributor

@wobito wobito left a comment

Choose a reason for hiding this comment

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

Just a if statement confusion

When `CanUseCgroups` is called, with systemd as the intended cgroups
manager, make sure that a systemd init is actually running.

This fixes flows where Singularity run nested inside another
container, that doesn't provide a systemd init or mount the host
`/run` directory into the container.

Fixes sylabs#3536
@dtrudg dtrudg merged commit 6167958 into sylabs:main Feb 20, 2025
1 check passed
@dtrudg dtrudg deleted the issue-3536 branch February 20, 2025 14:36
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.

Singularity-in-docker --oci as root fails
2 participants