Closed msackman closed 1 month ago
I finally had some time to dig into this, it's simply because nerdctl defaults runtime to io.containerd.runc.v2
and explicitly sends this to containerd so it doesn't use its default setting. If you want nerdctl to respect containerd's default runtime you'll need to file an upstream issue.
As for this repository's VM running with k3sIntegration = true; gVisorIntegration = true
I see all the kube-system pods running runsc:
[root@nixos:~]# ps aux | grep runsc
root 2005 0.0 0.2 1235980 9856 ? Sl 23:46 0:00 /nix/store/ns4p5pskqlmzl2bh2565v39l9wab2svn-gvisor-20240401.0/bin/containerd-shim-runsc-v1 -namespace k8s.io -address /run/containerd/containerd.sock -publish-binary /nix/store/gq22qd
root 2007 0.0 0.2 1235980 9728 ? Sl 23:46 0:00 /nix/store/ns4p5pskqlmzl2bh2565v39l9wab2svn-gvisor-20240401.0/bin/containerd-shim-runsc-v1 -namespace k8s.io -address /run/containerd/containerd.sock -publish-binary /nix/store/gq22qd
root 2059 0.0 0.3 1254592 15360 ? Ssl 23:46 0:00 runsc-gofer --root=/run/containerd/runsc/k8s.io --log=/run/containerd/io.containerd.runtime.v2.task/k8s.io/65add7a5e81e2362c5c8d7a49f65c8d9e7f0b9096f072ef1f7048e2e4080af77/log.json -1
See:
cc @akihirosuda
nerdctl ignores
[plugins."io.containerd.grpc.v1.cri"]
configExpected behavior, because nerdctl does not use CRI (Kubernetes Container Runtime Interface) API.
I'm experimenting with the new gvisor support.
it certainly starts up and works, but on the host a
ps aux | grep runsc
gives nothing.ps aux | grep runc
does give results.Whereas:
and now a
ps aux | grep runsc
showsrunsc-gofer
andrunsc-sandbox
working.Incidentally:
But if I set
defaultRuntime = "io.containerd.runsc.v1"
then I get the cgroup error (WARN[0002] cannot set cgroup manager to "systemd" for runtime "io.containerd.runsc.v1"
) because it's not going through your wrapper to ignore the cgroups. So yourrunsc
wrapper definitely works when explicitly used, but for some reason it doesn't seem to be found when set as the default.The containerd.toml does contain
default_runtime_name = "runsc"
, so I do not understand why it's not taking effect.