From 59f487d7ab8213d8e42404da4f73f2b4fa5ab558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 6 Mar 2026 12:33:52 +0100 Subject: [PATCH] do-not-merge: tests/cri-containerd: temporarily use containerd fork with getRuncOptions fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cri-containerd integration tests fail with the shim sandboxer when running non-runc runtimes (e.g. Kata). The root cause is a bug in containerd's client/task.go: getRuncOptions() unconditionally tries to unmarshal the container's stored runtimeOptions into containerd.runc.v1.Options, but Kata containers store runtimeoptions.v1.Options. This causes: failed to create containerd task: failed to get runtime v2 options: can't unmarshal type "runtimeoptions.v1.Options" to output "containerd.runc.v1.Options" A fix has been submitted upstream. Until it is merged and released, clone containerd from the fork that carries the fix so that `make cri-integration` (which builds and runs its own containerd daemon) picks up the corrected binary. TODO: revert once the fix is in an upstream containerd release and versions.yaml is updated accordingly. Signed-off-by: Fabiano FidĂȘncio --- tests/integration/cri-containerd/gha-run.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tests/integration/cri-containerd/gha-run.sh b/tests/integration/cri-containerd/gha-run.sh index f00ec7b425..9aaf0aa4f2 100755 --- a/tests/integration/cri-containerd/gha-run.sh +++ b/tests/integration/cri-containerd/gha-run.sh @@ -61,9 +61,23 @@ function install_dependencies() { "install_${dep[0]}" "${dep[1]}" done - # Clone containerd as we'll need to build it in order to run the tests - # base_version: The version to be intalled in the ${major}.${minor} format - clone_cri_containerd $(get_from_kata_deps ".externals.containerd.${CONTAINERD_VERSION}") + # Clone containerd as we'll need to build it in order to run the tests. + # TODO: revert to upstream once https://github.com/containerd/containerd/pull/XXXXX + # (fix for getRuncOptions() failing for non-runc runtimes like Kata) is merged and + # released. + local containerd_fork="fidencio/containerd" + local containerd_branch="topic/fix-runc-options-type-mismatch-for-non-runc-runtimes" + info "Cloning containerd from fork ${containerd_fork}@${containerd_branch} (temporary, pending upstream fix)" + rm -rf containerd + git clone -b "${containerd_branch}" "https://github.com/${containerd_fork}" + + # `make cri-integration` uses the cloned tree's `bin/containerd`, but later + # Kata-specific tests restart the systemd service and thus use + # `/usr/local/bin/containerd`. Install the same patched daemon there so both + # phases exercise the same containerd build. + info "Building and installing the patched containerd daemon for systemd restarts" + make -C containerd bin/containerd + sudo install -m 0755 containerd/bin/containerd /usr/local/bin/containerd } function run() {