Skip to content

Commit

Permalink
[Tempest] Modify IMAGES_TIMEOUT for individual images
Browse files Browse the repository at this point in the history
This patch allows to modify IMAGES_CREATION_TIMEOUT for individual
images. This better fits the interface of the extraImges parameter in
the Tempest CR.
  • Loading branch information
lpiwowar committed Aug 16, 2024
1 parent 651dd33 commit aee7c0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions container-images/tcib/base/os/tempest/run_tempest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit aee7c0d

Please sign in to comment.