Skip to content

Commit 5836b15

Browse files
committed
Wait for VM to stop before deleting security group.
Related to bug 938853. The patch for this bug prevents deleting security groups through the OpenStack API if they are still in use. This patch for devstack updates the floating_ips exercise script to wait until the VM has stopped before deleting the security group. Change-Id: If42f85934c2b92d4d001c419cabb09e2e3dc1aae
1 parent 8d87ca0 commit 5836b15

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

exercises/floating_ips.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,11 @@ nova floating-ip-delete $TEST_FLOATING_IP
195195
# shutdown the server
196196
nova delete $VM_UUID
197197

198+
# make sure the VM shuts down within a reasonable time
199+
if ! timeout $TERMINATE_TIMEOUT sh -c "while nova show $VM_UUID | grep status | grep -q ACTIVE; do sleep 1; done"; then
200+
echo "server didn't shut down!"
201+
exit 1
202+
fi
203+
198204
# Delete a secgroup
199205
nova secgroup-delete $SECGROUP
200-
201-
# FIXME: validate shutdown within 5 seconds
202-
# (nova show $NAME returns 1 or status != ACTIVE)?

0 commit comments

Comments
 (0)