Skip to content

Conversation

@dtrudg
Copy link
Member

@dtrudg dtrudg commented May 11, 2022

Description of the Pull Request (PR):

In singularity, cgroups device limits have always defaulted to allow-all. When a cgroups config is provided with no explicit device rules, no cgroups mediated device limits have applied.

We recently switched to runc/libcontainer/cgroups as our cgroups manager (from containerd/cgroups), and this applies a default deny rule for devices.

Revert to previous behavior by asking runc/libcontainer/cgroups to skip application of device limits if no limits are provided in the spec that has been passed.

This fixes or addresses the following GitHub issues:

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

In singularity, cgroups device limits have always defaulted to
allow-all. When a cgroups config is provided with no explicit device
rules, no cgroups mediated device limits have applied.

We recently switched to runc/libcontainer/cgroups as our cgroups
manager (from containerd/cgroups), and this applies a default deny
rule for devices.

Revert to previous behavior by asking runc/libcontainer/cgroups to
skip application of device limits if no limits are provided in the
spec that has been passed.

Fixes sylabs#787
@dtrudg dtrudg added bug Something isn't working ci:e2e labels May 11, 2022
@dtrudg dtrudg added this to the SingularityCE 3.10 milestone May 11, 2022
@dtrudg dtrudg self-assigned this May 11, 2022
@dtrudg dtrudg marked this pull request as draft May 11, 2022 14:39
The units GiB / KiB / MiB may or may not be present depending on the
specification of the system on which the tests are run, so we can't
insist they are present.
@dtrudg dtrudg marked this pull request as ready for review May 11, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/dev/null: Operation not permitted when using cgroup, and running as root

2 participants