In case of rootless, cgroup2 mount into container /sys/fs/cgroup. After I created sub-cgroup test, and then exited. A error message shown
ERRO[0029] remove /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/user.slice/runc-foo.scope: device or resource busy
Reproduce:
runc spec --rootless
// add cgroupfs mount into config.json
{
"destination": "/sys/fs/cgroup",
"type": "cgroup",
"source": "cgroup",
"options": [
"nosuid",
"noexec",
"nodev",
"relatime"
]
}
runc --systemd-cgroup run foo
// in the container
mkdir /sys/fs/cgroup/test
exit
systemd version: 239 (239-41.el8_3)
kernel version: 4.18.0-305.12.1.el8_4.x86_64
linux distro: centos 8
In case of rootless, cgroup2 mount into container
/sys/fs/cgroup. After I created sub-cgrouptest, and then exited. A error message shownReproduce:
systemd version: 239 (239-41.el8_3)
kernel version: 4.18.0-305.12.1.el8_4.x86_64
linux distro: centos 8