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

Fedora 33 cgroups v1 runsc cgroup error "no such file or directory" #5430

Closed
ghost opened this issue Feb 2, 2021 · 1 comment · Fixed by #5562
Closed

Fedora 33 cgroups v1 runsc cgroup error "no such file or directory" #5430

ghost opened this issue Feb 2, 2021 · 1 comment · Fixed by #5562
Assignees
Labels
type: bug Something isn't working

Comments

@ghost
Copy link

ghost commented Feb 2, 2021

Fedora 33

Package golang-gvisor-20201216.0-1.20210114git6cc587a.fc33.x86_64
runsc -version
runsc version VERSION_MISSING
spec: 1.0.2-dev

Initially I got the expected cgroups v2 error.

systemd.unified_cgroup_hierarchy=0
After rebuilding grub and rebooting the error has changed:

sudo runsc do echo ok
creating container: configuring cgroup: open /sys/fs/cgroup/cpuset/runsc-022049/cpuset.cpus: no such file or directory

/sys/fs/cgroup/cpuset/ exists and is populated:

.r--r--r--@ 0 root root 2 Feb 11:04 cgroup.controllers
.r--r--r--@ 0 root root 2 Feb 11:04 cgroup.events
.rw-r--r--@ 0 root root 2 Feb 11:04 cgroup.freeze
.rw-r--r--@ 0 root root 2 Feb 11:04 cgroup.max.depth
.rw-r--r--@ 0 root root 2 Feb 11:04 cgroup.max.descendants
.rw-r--r--@ 0 root root 2 Feb 11:04 cgroup.procs
.r--r--r--@ 0 root root 2 Feb 11:04 cgroup.stat
.rw-r--r--@ 0 root root 2 Feb 11:04 cgroup.subtree_control
.rw-r--r--@ 0 root root 2 Feb 11:04 cgroup.threads
.rw-r--r--@ 0 root root 2 Feb 11:04 cgroup.type
.rw-r--r--@ 0 root root 2 Feb 11:04 cpu.max
.rw-r--r--@ 0 root root 2 Feb 11:04 cpu.pressure
.r--r--r--@ 0 root root 2 Feb 11:04 cpu.stat
.rw-r--r--@ 0 root root 2 Feb 11:04 cpu.weight
.rw-r--r--@ 0 root root 2 Feb 11:04 cpu.weight.nice
.rw-r--r--@ 0 root root 2 Feb 11:04 io.bfq.weight
.rw-r--r--@ 0 root root 2 Feb 11:04 io.latency
.rw-r--r--@ 0 root root 2 Feb 11:04 io.max
.rw-r--r--@ 0 root root 2 Feb 11:04 io.pressure
.r--r--r--@ 0 root root 2 Feb 11:04 io.stat
.rw-r--r--@ 0 root root 2 Feb 11:04 io.weight
.r--r--r--@ 0 root root 2 Feb 11:04 memory.current
.r--r--r--@ 0 root root 2 Feb 11:04 memory.events
.r--r--r--@ 0 root root 2 Feb 11:04 memory.events.local
.rw-r--r--@ 0 root root 2 Feb 11:04 memory.high
.rw-r--r--@ 0 root root 2 Feb 11:04 memory.low
.rw-r--r--@ 0 root root 2 Feb 11:04 memory.max
.rw-r--r--@ 0 root root 2 Feb 11:04 memory.min
.r--r--r--@ 0 root root 2 Feb 11:04 memory.numa_stat
.rw-r--r--@ 0 root root 2 Feb 11:04 memory.oom.group
.rw-r--r--@ 0 root root 2 Feb 11:04 memory.pressure
.r--r--r--@ 0 root root 2 Feb 11:04 memory.stat
.r--r--r--@ 0 root root 2 Feb 11:04 memory.swap.current
.r--r--r--@ 0 root root 2 Feb 11:04 memory.swap.events
.rw-r--r--@ 0 root root 2 Feb 11:04 memory.swap.high
.rw-r--r--@ 0 root root 2 Feb 11:04 memory.swap.max
.r--r--r--@ 0 root root 2 Feb 11:04 pids.current
.r--r--r--@ 0 root root 2 Feb 11:04 pids.events
.rw-r--r--@ 0 root root 2 Feb 11:04 pids.max

@ghost ghost added the type: bug Something isn't working label Feb 2, 2021
@fvoznika fvoznika self-assigned this Feb 18, 2021
@fvoznika
Copy link
Member

The structure you pasted above is from cgroups v2. Most likely the cpuset directory was created by runsc thinking that it's operating on cgroups v1. When both v1 and v2 are enabled, /sys/fs/cgroup looks like this:

[core@fedora ~]$ ls -l /sys/fs/cgroup
total 0
dr-xr-xr-x. 4 root root  0 Feb 18 00:56 blkio
lrwxrwxrwx. 1 root root 11 Feb 18 00:56 cpu -> cpu,cpuacct
dr-xr-xr-x. 4 root root  0 Feb 18 00:56 cpu,cpuacct
lrwxrwxrwx. 1 root root 11 Feb 18 00:56 cpuacct -> cpu,cpuacct
dr-xr-xr-x. 3 root root  0 Feb 18 00:56 cpuset
dr-xr-xr-x. 5 root root  0 Feb 18 00:56 devices
dr-xr-xr-x. 3 root root  0 Feb 18 00:56 freezer
dr-xr-xr-x. 3 root root  0 Feb 18 00:56 hugetlb
dr-xr-xr-x. 5 root root  0 Feb 18 00:56 memory
lrwxrwxrwx. 1 root root 16 Feb 18 00:56 net_cls -> net_cls,net_prio
dr-xr-xr-x. 3 root root  0 Feb 18 00:56 net_cls,net_prio
lrwxrwxrwx. 1 root root 16 Feb 18 00:56 net_prio -> net_cls,net_prio
dr-xr-xr-x. 3 root root  0 Feb 18 00:56 perf_event
dr-xr-xr-x. 5 root root  0 Feb 18 00:56 pids
dr-xr-xr-x. 5 root root  0 Feb 18 00:56 systemd
dr-xr-xr-x. 5 root root  0 Feb 18 00:56 unified   ===> cgroups v2 is mounted here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant