do-not-merge: tests/cri-containerd: temporarily use containerd fork with getRuncOptions fix

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 <ffidencio@nvidia.com>
This commit is contained in:
Fabiano Fidêncio
2026-03-06 12:33:52 +01:00
parent 1f9260d978
commit 59f487d7ab

View File

@@ -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() {