Select the task API version from the shim bootstrap params - #8
Merged
dmcgowan merged 1 commit intoJul 28, 2026
Merged
Conversation
The harness parsed the version out of the shim start bootstrap params and then dialed containerd.task.v3.Task unconditionally, so a version 2 shim that containerd itself would happily drive over the v2 task service failed every test with "/containerd.task.v3.Task/Create does not exist". Select the client the way containerd does (core/runtime/v2 NewTaskClient): version 3 dials the v3 service, version 2 goes through the v2 bridge. A params payload without a version is treated as version 2, and unsupported versions fail fast at startShim. Also pass TTRPC_ADDRESS to the shim delete subcommand, matching containerd dead-shim cleanup: some shims (containerd/rust-extensions based ones unconditionally) read it during bootstrap and fail the delete without it. Found driving shimtest against a rust-extensions based shim, which registers only the v2 task service and declares version 2. Signed-off-by: Craig Gumbley <craiggumbley@gmail.com>
dmcgowan
approved these changes
Jul 28, 2026
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.
The harness parses the version out of the shim start bootstrap params and then dials
containerd.task.v3.Taskunconditionally, so a version 2 shim that containerd itself would happily drive over the v2 task service fails every test with/containerd.task.v3.Task/Create does not exist.This selects the client the way containerd does (
core/runtime/v2.NewTaskClient): version 3 dials the v3 service, version 2 goes through the v2 bridge. A params payload without a version is treated as version 2 (containerd parity), and unsupported versions fail fast atstartShim.Also passes
TTRPC_ADDRESSto theshim deletesubcommand, matching containerd dead-shim cleanup (core/runtime/v2/binary.go): some shims read it during bootstrap and fail the delete without it.Found while driving shimtest against a rust-extensions-based shim, which registers only the v2 task service and declares version 2 in its bootstrap params. With this change the full run suite passes against it (Windows host); the runc shim (v3) path is unchanged, verified by the client selection reducing to the previous behaviour for version 3.