how can I check if containerd is running with systemd cgroup for runc? #5413
-
Hello, I am trying to set
within a separate file under /etc/containerd/conf.d and include this with Is there a way to check if this configuration does work? I have not found any way to check the "real" configuration. Are there any logs or this there any output which does parse that? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
HI, you can try to use |
Beta Was this translation helpful? Give feedback.
-
Make sure you test it out on the latest 1.5 release candidate. We resolved a couple issues where runc.options were not being shown, such as via |
Beta Was this translation helpful? Give feedback.
-
After reading several blogs and trying a lot of things I got to find a workaround on a Chinese blog post: You may use this configuration for version = 2
[plugins]
[plugins."io.containerd.grpc.v1.cri"]
systemd_cgroup = true
[plugins."io.containerd.grpc.v1.cri".containerd]
[plugins."io.containerd.grpc.v1.cri".containerd.default_runtime]
runtime_type = "io.containerd.runtime.v1.linux"
[plugins."io.containerd.grpc.v1.cri".cni]
bin_dir = "/usr/lib/cni"
conf_dir = "/etc/cni/net.d"
[plugins."io.containerd.internal.v1.opt"]
path = "/var/lib/containerd/opt" The important values are Once the configuration file is updated run I hope this is useful to someone else. Tried on a Debian GNU/Linux 11 Bullseye AMD64 with containerd version 1.4.13~ds1 and cri-tools 1.0.0-beta.1-00 |
Beta Was this translation helpful? Give feedback.
-
Run $ sudo /usr/sbin/execsnoop-bpfcc -n runc
PCOMM PID PPID RET ARGS
runc 7984 7974 0 /usr/local/bin/runc --root /run/containerd/runc/k8s.io --log /run/containerd/io.containerd.runtime.v2.task/k8s.io/b6725c857dd7492a37f73038db80b7443ea1ed9c24b2d98a4b4e15ee8dad24c4/log.json --log-format json --systemd-cgroup create --bundle /run/containerd/io.containerd.runtime.v2.task/k8s.io/b6725c857dd7492a37f73038db80b7443ea1ed9c24b2d98a4b4e15ee8dad24c4 --pid-file /run/containerd/io.containerd.runtime.v2.task/k8s.io/b6725c857dd7492a37f73038db80b7443ea1ed9c24b2d98a4b4e15ee8dad24c4/init.pid b6725c857dd7492a37f73038db80b7443ea1ed9c24b2d98a4b4e15ee8dad24c4
runc 7999 7974 0 /usr/local/bin/runc --root /run/containerd/runc/k8s.io --log /run/containerd/io.containerd.runtime.v2.task/k8s.io/b6725c857dd7492a37f73038db80b7443ea1ed9c24b2d98a4b4e15ee8dad24c4/log.json --log-format json --systemd-cgroup start b6725c857dd7492a37f73038db80b7443ea1ed9c24b2d98a4b4e15ee8dad24c4
runc 8028 7974 0 /usr/local/bin/runc --root /run/containerd/runc/k8s.io --log /run/containerd/io.containerd.runtime.v2.task/k8s.io/7168c8744f0d2212fac0123f874e348972afae8d2f96a225daa4bae5f593725a/log.json --log-format json --systemd-cgroup create --bundle /run/containerd/io.containerd.runtime.v2.task/k8s.io/7168c8744f0d2212fac0123f874e348972afae8d2f96a225daa4bae5f593725a --pid-file /run/containerd/io.containerd.runtime.v2.task/k8s.io/7168c8744f0d2212fac0123f874e348972afae8d2f96a225daa4bae5f593725a/init.pid --console-socket /tmp/pty2458939095/pty.sock 7168c8744f0d2212fac0123f874e348972afae8d2f96a225daa4bae5f593725a
runc 8047 7974 0 /usr/local/bin/runc --root /run/containerd/runc/k8s.io --log /run/containerd/io.containerd.runtime.v2.task/k8s.io/7168c8744f0d2212fac0123f874e348972afae8d2f96a225daa4bae5f593725a/log.json --log-format json --systemd-cgroup start 7168c8744f0d2212fac0123f874e348972afae8d2f96a225daa4bae5f593725a The |
Beta Was this translation helpful? Give feedback.
Run
sudo /usr/sbin/execsnoop-bpfcc -n runc
, create some containers, and observe whether the execsnoop result contains--systemd-cgroup