CI: increase timeout during server resize

this is now more in line with other retry mechanisms:
use a local variable, use 10 attempts, sleep 10 seconds.

reason: there are still occasional resize failures in CI.

Signed-off-by: Sven Kieske <kieske@osism.tech>
Change-Id: I2ebb17459043ce677e72528bc7490b5728af396a
This commit is contained in:
Sven Kieske 2024-09-06 15:14:12 +02:00
parent 527ca510b0
commit c6036a033f
No known key found for this signature in database

View File

@ -191,16 +191,17 @@ function resize_instance {
# Confirming the resize operation is not instantaneous. Wait for change to
# be reflected in server status.
local attempt
attempt=1
while [[ $(openstack server show ${name} -f value -c status) != "ACTIVE" ]]; do
echo "Instance is not active yet"
attempt=$((attempt+1))
if [[ $attempt -eq 5 ]]; then
if [[ $attempt -eq 10 ]]; then
echo "FAILED: Instance failed to become active after resize confirm"
openstack --debug server show ${name}
return 1
fi
sleep 2
sleep 10
done
}