Repository navigation
fix(installer): support containerd config version 4 - #1
Merged
Merged
Conversation
The installer loaded the host's containerd configuration through containerd's own config loader, which refuses any config whose version is higher than the containerd release the installer was built against. With containerd/v2 v2.1 that cap is version 3, so on a host running containerd v2.3 — which writes version 4 — the install fails outright: error installing runtime: unable to configure containerd: loading containerd config: failed to load TOML from /etc/containerd/config.toml: expected containerd config version equal to or less than `3`, got `4` The shim binaries are already installed at that point, only the runtime never gets registered, so every pod using the zeropod RuntimeClass is stuck in FailedCreatePodSandBox with `no runtime for "zeropod" is configured`. The installer only needs three things out of that config: the version, the imports and the opt plugin path. Parse those directly with the TOML library the installer already depends on instead of going through the containerd loader, so the installer keeps working against config versions that did not exist when it was built. Also write the version 3 runtime drop-in for any config version >= 3 rather than only for exactly 3. The CRI plugin was renamed to io.containerd.cri.v1.runtime in config version 3 and kept that name since, and a drop-in may declare a lower version than the root config, so the version 3 form stays correct. Without this, a version 4 host got the pre-v3 io.containerd.grpc.v1.cri drop-in, which registers the runtime into a section the CRI plugin no longer reads.
mismosmi
force-pushed
the
containerd-config-v4
branch
from
August 3, 2026 11:47
aa6463c to
7df2979
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Our Scaleway Kapsule preview nodes were re-imaged onto containerd 2.3.1, which writes a version 4
/etc/containerd/config.toml. zeropod's installer is built againstcontainerd/v2v2.1.x, whose config loader caps at version 3, sods/zeropod-nodewent intoInit:CrashLoopBackOff:The shim and CRIU binaries are already installed by that point — only the runtime never gets registered — so every pod using the
zeropodRuntimeClass is stuck inFailedCreatePodSandBox: no runtime for "zeropod" is configured. That took down all of our preview environments.What
pelletier/go-toml/v2, which the installer already depends on — so no dependency bump, no change to the shim or manager, and the installer stays forward compatible with config versions that don't exist yet instead of breaking again on the next one.io.containerd.cri.v1.runtimein config version 3 and has kept that name since, and a drop-in may declare a lower version than the root config (containerd migrates it forward). Without this, a version 4 host got the pre-v3io.containerd.grpc.v1.cridrop-in, which registers the runtime into a section the CRI plugin no longer reads — a silent failure rather than a loud one.Testing
go test ./cmd/installer/— allTestConfigureContainerdsubtests pass, including a newv4 configcase.config.tomlfrom the affected node and had a real containerd 2.3.1 binary load the result.Worth sending upstream to ctrox/zeropod as well — there is no issue or PR filed for this yet, and upstream
mainstill pinscontainerd/v2 v2.1.6.