Merge "Wait for cinder volume to become available in CI"
This commit is contained in:
commit
e4693e8dcd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user