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

CreateContainerTest::test_create_with_device_cgroup_rules fails on cgroups v2 #2939

Closed
thaJeztah opened this issue Jan 20, 2022 · 0 comments · Fixed by #2940
Closed

CreateContainerTest::test_create_with_device_cgroup_rules fails on cgroups v2 #2939

thaJeztah opened this issue Jan 20, 2022 · 0 comments · Fixed by #2940

Comments

@thaJeztah
Copy link
Member

See moby/moby#42941 (comment)

This test is verifying that the container has the right options set (through docker inspect), but also checks if the cgroup-rules are set within the container by reading /sys/fs/cgroup/devices/devices.list

Unlike cgroups v1, on cgroups v2, there is no file interface, and rules are handled through ebpf, which means that the test will fail because this file is not present.

From the Linux documentation for cgroups v2: https://github.com/torvalds/linux/blob/v5.16/Documentation/admin-guide/cgroup-v2.rst#device-controller

(...)
Device controller manages access to device files. It includes both creation of new device files (using mknod), and access to the existing device files.

Cgroup v2 device controller has no interface files and is implemented on top of cgroup BPF. To control access to device files, a user may create bpf programs of type BPF_PROG_TYPE_CGROUP_DEVICE and attach them to cgroups with BPF_CGROUP_DEVICE flag. (...)

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 a pull request may close this issue.

1 participant