From 3624e6c42c0b8a9b16fa67a9e86b550a229d8327 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Mon, 18 Sep 2023 20:54:01 +0000 Subject: [PATCH] Add 60 seconds to server upgrade wait to account for delays in apiserver readiness Also change cleanup helper to ensure upgrade test doesn't pollute the images for the rest of the tests. Signed-off-by: Brad Davidson --- scripts/test-helpers | 4 ++-- scripts/test-run-upgrade | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/test-helpers b/scripts/test-helpers index 7f3f517e10..d1aee3171e 100755 --- a/scripts/test-helpers +++ b/scripts/test-helpers @@ -534,8 +534,8 @@ cleanup-test-env(){ export SERVER_ARGS='' export WAIT_SERVICES="${all_services[*]}" - unset AGENT_1_ARGS AGENT_2_ARGS AGENT_3_ARGS AGENT_DOCKER_ARGS - unset SERVER_1_ARGS SERVER_2_ARGS SERVER_3_ARGS SERVER_DOCKER_ARGS + unset AGENT_1_ARGS AGENT_2_ARGS AGENT_3_ARGS AGENT_DOCKER_ARGS K3S_IMAGE_AGENT + unset SERVER_1_ARGS SERVER_2_ARGS SERVER_3_ARGS SERVER_DOCKER_ARGS K3S_IMAGE_SERVER unset -f server-pre-hook server-post-hook agent-pre-hook agent-post-hook cluster-pre-hook cluster-post-hook test-post-hook test-cleanup-hook } diff --git a/scripts/test-run-upgrade b/scripts/test-run-upgrade index 3921eb1d1b..7274d21f77 100755 --- a/scripts/test-run-upgrade +++ b/scripts/test-run-upgrade @@ -41,9 +41,11 @@ start-test() { kubectl get node -o wide kubectl create -f scripts/airgap/volume-test.yaml - # Add post-hook sleeps to give the kubelet time to update the version after startup + # Add post-hook sleeps to give the kubelet time to update the version after startup. + # Server gets an extra 60 seconds to handle the metrics-server service being unavailable: + # https://github.com/kubernetes/kubernetes/issues/120739 server-post-hook(){ - sleep 15 + sleep 75 } export -f server-post-hook agent-post-hook(){