Closed rani-sharim closed 1 month ago
Can you share the exact command you're running? Does the directory exist where you're trying to set up the mount point? Here are a few commands to look around that might give more context:
# Look for "cgroup" and "cgroup2" file systems via:
grep cgroup /proc/filesystems
# See what cgroups are mounted via:
grep cgroup /proc/mounts
# Determine if v1 or v2 are enabled via:
stat -fc %T /sys/fs/cgroup
# Get a feel for bpf and cgroup layout via:
tree -L 2 /sys/fs
Edit: I understood from this that cgroup2 wasn't enabled. I enabled it and it seems to work now. Thanks!
What I'm doing is :
cargo generate http://github.com/aya-rs/aya-template
and choosing for example cgroup_sockopt
as project type.RUST_LOG=info cargo xtask run --release
./sys/fs/cgroup/unified
which doesn't exist on my system, so i change it to /sys/fs/cgroup
(since from what i understood this is the root now).As for the other commands
$ grep cgroup /proc/filesystems
nodev cgroup
nodev cgroup2
$ grep cgroup /proc/mounts
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
$ stat -fc %T /sys/fs/cgroup
tmpfs
$ tree -L 2 /sys/fs
/sys/fs
|-- bpf
|-- cgroup
| |-- blkio
| |-- cpu -> cpu,cpuacct
| |-- cpuacct -> cpu,cpuacct
| |-- cpu,cpuacct
| |-- cpuset
| |-- devices
| |-- freezer
| |-- hugetlb
| |-- memory
| |-- net_cls -> net_cls,net_prio
| |-- net_cls,net_prio
| |-- net_prio -> net_cls,net_prio
| |-- perf_event
| |-- pids
| `-- systemd
|-- pstore [error opening dir]
`-- xfs
|-- stats
`-- xvda1
21 directories, 0 files
Kernel version:
5.10.220-209.869.amzn2.x86_64
Every cgroup template I try to execute fails to attach the program (I replaced the cgroup path from
/sys/fs/cgroup/unified
to/sys/fs/cgroup
since it doesn't exist on my system) fails with the errorWould appreciate help figuring out why?