diff --git a/tests/test-openstack.sh b/tests/test-openstack.sh index cbffebe833..4f6d6d1248 100755 --- a/tests/test-openstack.sh +++ b/tests/test-openstack.sh @@ -27,6 +27,17 @@ function test_openstack_logged { if [[ $ACTION = "ceph" ]] || [[ $ACTION == "cinder-lvm" ]]; then echo "TESTING: Cinder volume attachment" openstack volume create --size 2 test_volume + attempt=1 + while [[ $(openstack volume show test_volume -f value -c status) != "available" ]]; do + echo "Volume not available yet" + attempt=$((attempt+1)) + if [[ $attempt -eq 10 ]]; then + echo "Volume failed to become available" + openstack volume show test_volume + return 1 + fi + sleep 10 + done openstack server add volume kolla_boot_test test_volume --device /dev/vdb attempt=1 while [[ $(openstack volume show test_volume -f value -c status) != "in-use" ]]; do