From 5ca05083d05b83daccf0d80d672c732f377f828f Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 25 Mar 2021 09:47:42 +0100 Subject: [PATCH] hostcheck: increase timeout and fix indentation Signed-off-by: Alessandro Comodi --- .github/kokoro/steps/hostcheck.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/kokoro/steps/hostcheck.sh b/.github/kokoro/steps/hostcheck.sh index ae916bab..8606f527 100755 --- a/.github/kokoro/steps/hostcheck.sh +++ b/.github/kokoro/steps/hostcheck.sh @@ -21,12 +21,12 @@ while true; do MOUNT_RET=$? set +x -e if [[ $MOUNT_RET == 0 ]] ; then - break; + break; else - echo "----------------------------------------" - echo "Error: No storage is mounted on /tmpfs." - echo "----------------------------------------" - echo "" + echo "----------------------------------------" + echo "Error: No storage is mounted on /tmpfs." + echo "----------------------------------------" + echo "" fi # Dump debugging information. @@ -72,10 +72,13 @@ while true; do systemctl | grep dev # Fail if we have waited to long. - if [[ $STORAGE_CHECK_ATTEMPTS -gt 5 ]]; then - exit $MOUNT_RET + if [[ $STORAGE_CHECK_ATTEMPTS -gt 10 ]]; then + echo "==============================" + echo " ERROR: Storage check timeout" + echo "==============================" + exit $MOUNT_RET else - STORAGE_CHECK_ATTEMPTS=$(( $STORAGE_CHECK_ATTEMPTS + 1 )) + STORAGE_CHECK_ATTEMPTS=$(( $STORAGE_CHECK_ATTEMPTS + 1 )) fi # Wait for a bit before rechecking.