Ensure ping returns after 5mins timeout
authorGiulio Fidente <gfidente@redhat.com>
Wed, 21 Oct 2015 15:26:34 +0000 (17:26 +0200)
committerGiulio Fidente <gfidente@redhat.com>
Wed, 21 Oct 2015 15:26:34 +0000 (17:26 +0200)
This change ensures the validation script returns (with a failure)
if the ping command remains stuck waiting for a response for more
than 5 minutes.

Change-Id: Ib184a01e04fe3c5e3ad13757a355735fff84548d

validation-scripts/all-nodes.sh

index 38a5a55..fcbfcc9 100644 (file)
@@ -15,7 +15,7 @@ function ping_controller_ips() {
 
        if [ $REMOTE_NETWORK/$LOCAL_CIDR == $LOCAL_NETWORK ]; then
          echo -n "Trying to ping $REMOTE_IP for local network $LOCAL_NETWORK..."
-         if ! ping -c 1 $REMOTE_IP &> /dev/null; then
+         if ! ping -W 300 -c 1 $REMOTE_IP &> /dev/null; then
            echo "FAILURE"
            echo "$REMOTE_IP is not pingable. Local Network: $LOCAL_NETWORK" >&2
            exit 1