Skip to content

Commit a205b46

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Wait for VM to stop before deleting security group."
2 parents a6f5fdd + 5836b15 commit a205b46

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)