From 756c842a7743a84a084b4cc211998e3fdd171592 Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Fri, 4 Jan 2013 13:37:22 -0800 Subject: [PATCH] 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 --- exercises/volumes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/volumes.sh b/exercises/volumes.sh index 48a976ed3d..5c5e0e448a 100755 --- a/exercises/volumes.sh +++ b/exercises/volumes.sh @@ -192,7 +192,7 @@ echo "Completed volume-detach in $((end_time - start_time)) seconds" # Delete volume start_time=`date +%s` cinder delete $VOL_ID || die "Failure deleting volume $VOL_NAME" -if ! timeout $ACTIVE_TIMEOUT sh -c "while ! cinder list | grep $VOL_NAME; do sleep 1; done"; then +if ! timeout $ACTIVE_TIMEOUT sh -c "while cinder list | grep $VOL_NAME; do sleep 1; done"; then echo "Volume $VOL_NAME not deleted" exit 1 fi