Skip to content

Commit

Permalink
Merge "[CI] Improve Cinder testing robustness" into stable/yoga
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Feb 10, 2023
2 parents 416c8ab + 21d2124 commit 84ba33e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test-core-openstack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function create_a_volume {

local attempt

openstack volume create --size 2 $volume_name
openstack volume create --size 1 $volume_name
attempt=1
while [[ $(openstack volume show $volume_name -f value -c status) != "available" ]]; do
echo "Volume $volume_name not available yet"
Expand All @@ -41,17 +41,17 @@ function create_a_volume_from_image {

local attempt

openstack volume create --image $image_name --size 2 $volume_name
openstack volume create --image $image_name --size 1 $volume_name
attempt=1
while [[ $(openstack volume show $volume_name -f value -c status) != "available" ]]; do
echo "Volume $volume_name not available yet"
attempt=$((attempt+1))
if [[ $attempt -eq 10 ]]; then
if [[ $attempt -eq 11 ]]; then
echo "Volume $volume_name failed to become available"
openstack volume show $volume_name
return 1
fi
sleep 10
sleep 30
done
}

Expand Down

0 comments on commit 84ba33e

Please sign in to comment.