From 41b7577f08da85a7507d106de7068121019c42e2 Mon Sep 17 00:00:00 2001 From: ChengyuZhu6 Date: Fri, 26 Jul 2024 23:26:52 +0800 Subject: [PATCH 1/2] tests: add image check before running coco tests Currently, there are some issues with pulling images in CI, such as : https://github.com/kata-containers/kata-containers/actions/runs/10109747602/job/27959198585 This issue is caused by switching between different snapshotters for the same image in some scenarios. To resolve it, we can check existing images to ensure all content is available locally before running tests. Fixes: #10029 Signed-off-by: ChengyuZhu6 --- tests/integration/kubernetes/gha-run.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index e1ec1faa89..c5c4654d2b 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -493,6 +493,22 @@ function cleanup_snapshotter() { echo "::endgroup::" } +# Check existing images to ensure all content is available locally before running tests +function image_check() { + local ctr_args="sudo ctr " + if [[ " k3s rke2 " =~ " ${KUBERNETES} " ]]; then + ctr_args+="--address /run/k3s/containerd/containerd.sock " + fi + ctr_args+="--namespace k8s.io " + local incomplete_images=$($ctr_args image check | grep "incomplete" | awk '{print $1}') + if [ -z "$incomplete_images" ]; then + return + fi + for incomplete_image in $incomplete_images; do + $ctr_args content fetch $incomplete_image || true + done +} + function deploy_nydus_snapshotter() { echo "::group::deploy_nydus_snapshotter" ensure_yq @@ -556,6 +572,10 @@ function deploy_nydus_snapshotter() { echo "::group::nydus snapshotter describe" kubectl_retry describe pod --selector=app=nydus-snapshotter -n nydus-system echo "::endgroup::" + + echo "::group::image check" + image_check + echo "::endgroup::" } function cleanup_nydus_snapshotter() { From 2cfb32ac4df755aac457ad170546b5fef30a212b Mon Sep 17 00:00:00 2001 From: ChengyuZhu6 Date: Wed, 31 Jul 2024 11:02:53 +0800 Subject: [PATCH 2/2] version: bump nydus snapshotter to v0.13.14 bump nydus snapshotter to v0.13.14 to stabilize CIs. Signed-off-by: ChengyuZhu6 --- versions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.yaml b/versions.yaml index bb69a570f0..783183d731 100644 --- a/versions.yaml +++ b/versions.yaml @@ -322,7 +322,7 @@ externals: nydus-snapshotter: description: "Snapshotter for Nydus image acceleration service" url: "https://github.com/containerd/nydus-snapshotter" - version: "v0.13.13" + version: "v0.13.14" ovmf: description: "Firmware, implementation of UEFI for virtual machines."