Closed yosupo06 closed 7 months ago
dockerを起動して失敗した後に改めてcpuset.cpuを指定しなおすと動きそうなことが分かった なぜ?
root@dev-judge-instance-group-jcmc:/home/yosupo# mkdir /sys/fs/cgroup/dev.slice
root@dev-judge-instance-group-jcmc:/home/yosupo# echo 'isolated' > /sys/fs/cgroup/dev.slice/cpuset.cpus.partition
root@dev-judge-instance-group-jcmc:/home/yosupo# echo '0' > /sys/fs/cgroup/dev.slice/cpuset.cpus
root@dev-judge-instance-group-jcmc:/home/yosupo# cat /sys/fs/cgroup/dev.slice/cpuset.cpus.partition
isolated
root@dev-judge-instance-group-jcmc:/home/yosupo# cat /sys/fs/cgroup/dev.slice/cpuset.cpus
0
root@dev-judge-instance-group-jcmc:/home/yosupo# docker run --cgroup-parent dev.slice --rm jojje/cloud-cpu-bench
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: error `creating` systemd unit `docker-bb086655760b0278a9b07429139ddf06ba10b60afebf37c80774a96ab36352f0.scope`: got `failed`: unknown.
root@dev-judge-instance-group-jcmc:/home/yosupo# cat /sys/fs/cgroup/dev.slice/cpuset.cpus.partition
isolated
root@dev-judge-instance-group-jcmc:/home/yosupo# cat /sys/fs/cgroup/dev.slice/cpuset.cpus
root@dev-judge-instance-group-jcmc:/home/yosupo# echo '0' > /sys/fs/cgroup/dev.slice/cpuset.cpus
root@dev-judge-instance-group-jcmc:/home/yosupo# docker run --cgroup-parent dev.slice --rm jojje/cloud-cpu-bench
Capping to 1. Use -f to override.
117M
117M
なんか確率で成功したりしなかったり…
https://github.com/containerd/containerd/issues/9160
厄介なの踏んだかも トホホ
https://stackoverflow.com/questions/43794169/docker-change-cgroup-driver-to-systemd
{
"exec-opts": ["native.cgroupdriver=systemd"]
}
cgroupdriverをcgroupfsにしたら動いてるかも?