Browse files

Fix intermittent error in exercises/floating_ips.sh

Every once in a while I see this error running floating_ips.sh:

/devstack/exercises/floating_ips.sh:184:ping_check
/devstack/functions:356:_ping_check_neutron
/devstack/lib/neutron:904:die
[ERROR] /devstack/lib/neutron:904 [Fail] Could ping server

I think the problem is that it immediately tries to ping right
after the icmp rule is deleted.  Add a timeout and check so we
at least wait one second.

Change-Id: I753ec257fa12f6d2ddff1a5b1909e32d8995e173
  • Loading branch information...
1 parent 2cf03d2 commit 9b3602ccf64f1d690a0a3d4adff987a5a12594b1 Brian Haley committed Feb 28, 2014
Showing with 4 additions and 0 deletions.
  1. +4 −0 exercises/floating_ips.sh
View
4 exercises/floating_ips.sh
@@ -178,6 +178,10 @@ fi
nova secgroup-delete-rule $SECGROUP icmp -1 -1 0.0.0.0/0 || \
die $LINENO "Failure deleting security group rule from $SECGROUP"
+if ! timeout $ASSOCIATE_TIMEOUT sh -c "while nova secgroup-list-rules $SECGROUP | grep -q icmp; do sleep 1; done"; then
+ die $LINENO "Security group rule not deleted from $SECGROUP"
+fi
+
# FIXME (anthony): make xs support security groups
if [ "$VIRT_DRIVER" != "xenserver" -a "$VIRT_DRIVER" != "openvz" ]; then
# Test we can aren't able to ping our floating ip within ASSOCIATE_TIMEOUT seconds

0 comments on commit 9b3602c

Please sign in to comment.