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
This commit is contained in:
Russell Bryant 2012-02-24 10:23:33 -05:00
parent 8d87ca0533
commit 5836b1533a

View File

@ -195,8 +195,11 @@ nova floating-ip-delete $TEST_FLOATING_IP
# shutdown the server # shutdown the server
nova delete $VM_UUID nova delete $VM_UUID
# make sure the VM shuts down within a reasonable time
if ! timeout $TERMINATE_TIMEOUT sh -c "while nova show $VM_UUID | grep status | grep -q ACTIVE; do sleep 1; done"; then
echo "server didn't shut down!"
exit 1
fi
# Delete a secgroup # Delete a secgroup
nova secgroup-delete $SECGROUP nova secgroup-delete $SECGROUP
# FIXME: validate shutdown within 5 seconds
# (nova show $NAME returns 1 or status != ACTIVE)?