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
(cherry picked from commit 756c842a7743a84a084b4cc211998e3fdd171592)
... | ... |
@@ -205,7 +205,7 @@ echo "Completed volume-detach in $((end_time - start_time)) seconds" |
205 | 205 |
# Delete volume |
206 | 206 |
start_time=`date +%s` |
207 | 207 |
nova volume-delete $VOL_ID || die "Failure deleting volume $VOL_NAME" |
208 |
-if ! timeout $ACTIVE_TIMEOUT sh -c "while ! nova volume-list | grep $VOL_NAME; do sleep 1; done"; then |
|
208 |
+if ! timeout $ACTIVE_TIMEOUT sh -c "while nova volume-list | grep $VOL_NAME; do sleep 1; done"; then |
|
209 | 209 |
echo "Volume $VOL_NAME not deleted" |
210 | 210 |
end_time=`date +%s` |
211 | 211 |
echo "Failed volume-delete after $((end_time - start_time)) seconds" |