From 43efe18c39a53ea69dd2f31e6827d79b745e6a02 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Tue, 16 Apr 2024 19:54:03 -0400 Subject: [PATCH] test/includes/microcloud: poll less aggressively in lxd_wait_vm() Signed-off-by: Simon Deziel --- microcloud/test/includes/microcloud.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/microcloud/test/includes/microcloud.sh b/microcloud/test/includes/microcloud.sh index 815032cc6..5de3de5dc 100644 --- a/microcloud/test/includes/microcloud.sh +++ b/microcloud/test/includes/microcloud.sh @@ -1054,7 +1054,7 @@ lxd_wait_vm() { name="${1}" echo "==> ${name} Awaiting VM..." - for round in $(seq 640); do + for round in $(seq 160); do if lxc info "${name}" | grep -qF "Status: READY" ; then wait_snapd "${name}" echo " ${name} VM is ready" @@ -1062,12 +1062,12 @@ lxd_wait_vm() { fi # Sometimes the VM just won't start, so retry after 3 minutes. - if [ "$((round % 180))" = 0 ]; then + if [ "$((round % 45))" = 0 ]; then echo "==> ${name} Timeout (${round}s): Re-initializing VM" lxc restart "${name}" --force fi - sleep 1 + sleep 4 done echo " ${name} VM failed to start"