diff --git a/container-images/tcib/base/os/tempest/run_tempest.sh b/container-images/tcib/base/os/tempest/run_tempest.sh index 5ab8102..68b756f 100644 --- a/container-images/tcib/base/os/tempest/run_tempest.sh +++ b/container-images/tcib/base/os/tempest/run_tempest.sh @@ -95,7 +95,6 @@ CONCURRENCY="${CONCURRENCY:-}" TEMPESTCONF_ARGS="" TEMPEST_ARGS="" TEMPEST_DEBUG_MODE="${TEMPEST_DEBUG_MODE:-false}" -TEMPEST_IMAGE_CREATE_TIMEOUT="${TEMPEST_IMAGE_CREATE_TIMEOUT:-300}" function catch_error_if_debug { echo "File run_tempest.sh has run into an error!" @@ -178,6 +177,7 @@ read -ra TEMPEST_EXTRA_IMAGES_OS_CLOUD <<< $TEMPEST_EXTRA_IMAGES_OS_CLOUD read -ra TEMPEST_EXTRA_IMAGES_ID <<< $TEMPEST_EXTRA_IMAGES_ID read -ra TEMPEST_EXTRA_IMAGES_NAME <<< $TEMPEST_EXTRA_IMAGES_NAME read -ra TEMPEST_EXTRA_IMAGES_CONTAINER_FORMAT <<< $TEMPEST_EXTRA_IMAGES_CONTAINER_FORMAT +read -ra TEMPEST_EXTRA_IMAGES_CREATE_TIMEOUT <<< $TEMPEST_EXTRA_IMAGES_CREATE_TIMEOUT read -ra TEMPEST_EXTRA_IMAGES_FLAVOR_ID <<< $TEMPEST_EXTRA_IMAGES_FLAVOR_ID read -ra TEMPEST_EXTRA_IMAGES_FLAVOR_RAM <<< $TEMPEST_EXTRA_IMAGES_FLAVOR_RAM @@ -252,8 +252,8 @@ function upload_extra_images { while [ "$STATUS" != "active" ]; do echo "Current status: $STATUS. Waiting for image to become active..." sleep 5 - if [ $(($(date +%s) - $START_TIME)) -gt $TEMPEST_IMAGE_CREATE_TIMEOUT ]; then - echo "Error: Image creation exceeded the timeout period of $TEMPEST_IMAGE_CREATE_TIMEOUT seconds." + if [ $(($(date +%s) - $START_TIME)) -gt ${TEMPEST_EXTRA_IMAGES_CREATE_TIMEOUT[image_index]} ]; then + echo "Error: Image creation exceeded the timeout period of ${TEMPEST_EXTRA_IMAGES_CREATE_TIMEOUT[image_index]} seconds." exit 1 fi STATUS=$(get_image_status)