From 87c278f6f1c08c59f7e99c02e6514884daa8b2ba Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 10 Feb 2023 13:17:23 +0100 Subject: [run-virt] Give dnbd3-fuse more time for connecting Also fix messed up operator logic, which resulted in the exit flag basically being ignored. --- .../opt/openslx/vmchooser/run-virt-includes/setup_image_access.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/modules/run-virt') diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_image_access.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_image_access.inc index 49bb2087..8b166806 100644 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_image_access.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_image_access.inc @@ -63,7 +63,7 @@ setup_dnbd3 () { # give it a bit of time usleep 250000 # check if we have the image - for TIMEOUT in 0.5 1 1 1 1 OUT; do + for TIMEOUT in 0.5 1 1 1 1 2 OUT; do if [ -r "${DNBD3_MOUNT_POINT}/img" ]; then VM_DISKFILE_REVISION="$(grep -m 1 "^Revision:" "${DNBD3_MOUNT_POINT}/status" | cut -d" " -f2)" VM_DISKFILE_RO="${DNBD3_MOUNT_POINT}/img" @@ -71,7 +71,9 @@ setup_dnbd3 () { add_cleanup "cleanup_dnbd3" break fi - [ "$TIMEOUT" = "OUT" ] || [ -e "$DNBD3_EXITFLAG" ] && break + if [ "$TIMEOUT" = "OUT" ] || [ -e "$DNBD3_EXITFLAG" ]; then + break + fi sleep "$TIMEOUT" done -- cgit v1.2.3-55-g7522