From 3c217c6c151ef8a22121c0a1467f42c756625f76 Mon Sep 17 00:00:00 2001 From: Hyounggyu Choi Date: Thu, 28 Mar 2024 09:34:07 +0100 Subject: [PATCH 1/3] ci|cri-containerd: Introduce qemu-runtime-rs for KATA_HYPERVISOR `qemu-runtime-rs` will be utilized to handle a test scenario where the VMM is QEMU and runtime-rs is employed. Note: Some of the tests are skipped. They are going to be reintegrated in the follow-up PR (Check out #9375). Fixes: #9371 Signed-off-by: Hyounggyu Choi --- tests/common.bash | 2 +- .../cri-containerd/integration-tests.sh | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/common.bash b/tests/common.bash index cd969afc2c..d0e2dde1a0 100644 --- a/tests/common.bash +++ b/tests/common.bash @@ -450,7 +450,7 @@ function enabling_hypervisor() { declare -r CONTAINERD_SHIM_KATA="/usr/local/bin/containerd-shim-kata-${KATA_HYPERVISOR}-v2" case "${KATA_HYPERVISOR}" in - dragonball | cloud-hypervisor) + dragonball|cloud-hypervisor|qemu-runtime-rs) sudo ln -sf "${KATA_DIR}/runtime-rs/bin/containerd-shim-kata-v2" "${CONTAINERD_SHIM_KATA}" declare -r CONFIG_DIR="${KATA_DIR}/share/defaults/kata-containers/runtime-rs" ;; diff --git a/tests/integration/cri-containerd/integration-tests.sh b/tests/integration/cri-containerd/integration-tests.sh index ba30ee7ea9..4a39c3b25e 100755 --- a/tests/integration/cri-containerd/integration-tests.sh +++ b/tests/integration/cri-containerd/integration-tests.sh @@ -255,7 +255,12 @@ function TestContainerMemoryUpdate() { DoContainerMemoryUpdate 0 fi - if [[ "${KATA_HYPERVISOR}" != "qemu" ]] || [[ "${ARCH}" == "ppc64le" ]] || [[ "${ARCH}" == "s390x" ]]; then + if [[ "${KATA_HYPERVISOR}" == "qemu-runtime-rs" ]]; then + # Remove TestContainerMemoryUpdate from passing_test + info "TestContainerMemoryUpdate skipped for qemu with runtime-rs" + info "Please check out https://github.com/kata-containers/kata-containers/issues/9375" + return + elif [[ "${KATA_HYPERVISOR}" != "qemu" ]] || [[ "${ARCH}" == "ppc64le" ]] || [[ "${ARCH}" == "s390x" ]]; then return fi @@ -657,8 +662,14 @@ function main() { TestContainerMemoryUpdate if [[ "${ARCH}" != "ppc64le" ]]; then - TestKilledVmmCleanup - TestDeviceCgroup + if [[ "${KATA_HYPERVISOR}" == "qemu-runtime-rs" ]]; then + info "TestKilledVmmCleanup and TestDeviceCgroup skipped for qemu with runtime-rs" + info "Please check out https://github.com/kata-containers/kata-containers/issues/9375" + break + else + TestKilledVmmCleanup + TestDeviceCgroup + fi fi popd From 606f8e1ab2ea57f67bba3d6182ff344ba2fea049 Mon Sep 17 00:00:00 2001 From: Hyounggyu Choi Date: Wed, 10 Apr 2024 11:15:16 +0200 Subject: [PATCH 2/3] runtime-rs: Adjust configuration for qemu-runtime-rs To make `qemu-runtime-rs` working for CI, we have to rename a configuration template file and `CONFIG_FILE_QEMU` in Makefile. Signed-off-by: Hyounggyu Choi --- src/runtime-rs/Makefile | 2 +- ...ation-qemu.toml.in => configuration-qemu-runtime-rs.toml.in} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/runtime-rs/config/{configuration-qemu.toml.in => configuration-qemu-runtime-rs.toml.in} (100%) diff --git a/src/runtime-rs/Makefile b/src/runtime-rs/Makefile index 9bfd6169e9..c380ca7b7d 100644 --- a/src/runtime-rs/Makefile +++ b/src/runtime-rs/Makefile @@ -249,7 +249,7 @@ endif ifneq (,$(QEMUCMD)) KNOWN_HYPERVISORS += $(HYPERVISOR_QEMU) - CONFIG_FILE_QEMU = configuration-qemu.toml + CONFIG_FILE_QEMU = configuration-qemu-runtime-rs.toml CONFIG_QEMU = config/$(CONFIG_FILE_QEMU) CONFIG_QEMU_IN = $(CONFIG_QEMU).in diff --git a/src/runtime-rs/config/configuration-qemu.toml.in b/src/runtime-rs/config/configuration-qemu-runtime-rs.toml.in similarity index 100% rename from src/runtime-rs/config/configuration-qemu.toml.in rename to src/runtime-rs/config/configuration-qemu-runtime-rs.toml.in From cf20a6a4ae0821167265c8dad9c298dfa21e6d3a Mon Sep 17 00:00:00 2001 From: Hyounggyu Choi Date: Wed, 3 Apr 2024 09:39:48 +0200 Subject: [PATCH 3/3] gha: Add qemu-runtime-rs to VMM matrix for run-cri-containerd This commit expands the VMM matrix for run-cri-containerd, adding a new item `qemu-runtime-rs` for a test scenario where the VMM is QEMU and runtime-rs is employed. This expansion affects the workflows for both x86_64 and s390x platforms. Signed-off-by: Hyounggyu Choi --- .github/workflows/basic-ci-amd64.yaml | 2 +- .github/workflows/run-cri-containerd-tests-s390x.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basic-ci-amd64.yaml b/.github/workflows/basic-ci-amd64.yaml index 6b44e79036..fef6056193 100644 --- a/.github/workflows/basic-ci-amd64.yaml +++ b/.github/workflows/basic-ci-amd64.yaml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: containerd_version: ['lts', 'active'] - vmm: ['clh', 'dragonball', 'qemu', 'stratovirt', 'cloud-hypervisor'] + vmm: ['clh', 'dragonball', 'qemu', 'stratovirt', 'cloud-hypervisor', 'qemu-runtime-rs'] runs-on: garm-ubuntu-2204-smaller env: CONTAINERD_VERSION: ${{ matrix.containerd_version }} diff --git a/.github/workflows/run-cri-containerd-tests-s390x.yaml b/.github/workflows/run-cri-containerd-tests-s390x.yaml index b01aa54df0..8b05196207 100644 --- a/.github/workflows/run-cri-containerd-tests-s390x.yaml +++ b/.github/workflows/run-cri-containerd-tests-s390x.yaml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: containerd_version: ['active'] - vmm: ['qemu'] + vmm: ['qemu', 'qemu-runtime-rs'] runs-on: s390x env: CONTAINERD_VERSION: ${{ matrix.containerd_version }}