Browse code

Properly wait until volumes are gone in volumes.sh

A logic error in volume exercise's wait for volume deletion
causes the test to do the opopsite, and continue on even tho
the volume is in in the 'deleting' state. If using a volume
backend that can quickly delete volumes (ceph), and the volume
is gone before entering the wait, the loop will spin, timeout
and fail the test.

Change-Id: I8e3d2aaa04e6a165e0dee32bedac97d35e13d5eb

Adam Gandelman authored on 2013/01/05 06:37:22
Showing 1 changed files
... ...
@@ -192,7 +192,7 @@ echo "Completed volume-detach in $((end_time - start_time)) seconds"
192 192
 # Delete volume
193 193
 start_time=`date +%s`
194 194
 cinder delete $VOL_ID || die "Failure deleting volume $VOL_NAME"
195
-if ! timeout $ACTIVE_TIMEOUT sh -c "while ! cinder list | grep $VOL_NAME; do sleep 1; done"; then
195
+if ! timeout $ACTIVE_TIMEOUT sh -c "while cinder list | grep $VOL_NAME; do sleep 1; done"; then
196 196
     echo "Volume $VOL_NAME not deleted"
197 197
     exit 1
198 198
 fi