Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tempest] Modify IMAGES_TIMEOUT for individual images #199

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 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 @@ -163,6 +162,7 @@ TEMPEST_EXTRA_IMAGES_FLAVOR_DISK="${TEMPEST_EXTRA_IMAGES_FLAVOR_DISK:-}"
TEMPEST_EXTRA_IMAGES_FLAVOR_VCPUS="${TEMPEST_EXTRA_IMAGES_FLAVOR_VCPUS:-}"
TEMPEST_EXTRA_IMAGES_FLAVOR_NAME="${TEMPEST_EXTRA_IMAGES_FLAVOR_NAME:-}"
TEMPEST_EXTRA_IMAGES_FLAVOR_OS_CLOUD="${TEMPEST_EXTRA_IMAGES_FLAVOR_OS_CLOUD:-}"
TEMPEST_EXTRA_IMAGES_CREATE_TIMEOUT="${TEMPEST_EXTRA_IMAGES_CREATE_TIMEOUT:-}"

# Convert comma separated lists to arrays
OLD_IFS=$IFS
Expand All @@ -178,6 +178,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
lpiwowar marked this conversation as resolved.
Show resolved Hide resolved

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 +253,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
Loading