Description of problem: k8s运行etcd镜像时报错: [root@anolis test]# ctr -n k8s.io run k8s.gcr.io/etcd:3.5.1-0 etcd ls ctr: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: openat2 /sys/fs/cgroup/k8s.io/etcd/cpu.weight: no such file or directory: unknown Version-Release number of selected component (if applicable): [root@anolis test]# uname -a Linux anolis 6.6.52+ #7 SMP PREEMPT_DYNAMIC Wed Oct 30 02:01:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux [root@anolis test]# ctr --version ctr github.com/containerd/containerd 1.6.20 How reproducible: 100% Steps to Reproduce: 1. 初始化配置 # containerd config default | tee /etc/containerd/config.toml # sed -i "s#SystemdCgroup\ \=\ false#SystemdCgroup\ \=\ true#g" /etc/containerd/config.toml # sed -i "s#registry.k8s.io#registry.aliyuncs.com/google_containers#g" /etc/containerd/config.toml 2. 配置crictl # cat <<EOF | tee /etc/crictl.yaml runtime-endpoint: unix:///run/containerd/containerd.sock image-endpoint: unix:///run/containerd/containerd.sock timeout: 10 debug: false EOF 3. 开启containerd服务 systemctl start containerd systemctl status containerd --查看服务是否正常开启 4. 在cr仓库上拉取镜像 ctr -n=k8s.io images pull registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.5.1-0 5. 运行etcd ctr -n k8s.io run registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.5.1-0 etcd ls Actual results: [root@anolis test]# ctr -n k8s.io run k8s.gcr.io/etcd:3.5.1-0 etcd ls ctr: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: openat2 /sys/fs/cgroup/k8s.io/etcd/cpu.weight: no such file or directory: unknown Expected results: 无报错 Additional info:
According to err log "openat2 /sys/fs/cgroup/k8s.io/etcd/cpu.weight: no such file or directory: unknown" Please check if you have enabled "cgroup-V2" update boot cmdline param like "systemd.unified_cgroup_hierarchy=1" By the way, this is not a 'fs' bug, I make it as "Invalid". If you still have problem, you can reopen it later.