aboutsummaryrefslogtreecommitdiffstats
path: root/validation-scripts
diff options
context:
space:
mode:
authorJoe Talerico <jtaleric@redhat.com>2016-03-29 14:10:20 -0400
committerJoe Talerico <jtaleric@redhat.com>2016-03-29 18:40:12 -0400
commit570c690bfb118e0cf130b7dbed7992676519ed9b (patch)
treefd15874f312b1f26606b0323382b6e291677293a /validation-scripts
parent7d704fbd074cdeb2b381aab353ee1deaeb9ae736 (diff)
Ping retry
The single ping method in the validation script is causing for deployments to fail. When reviewing the network connectivity, we are finding we actually do have connectivity ( https://gist.github.com/jtaleric/0276a117625e44993be0 ). This patch is to change the ping count from 1 to 10, to ensure the network is up. Closes-Bug: 1563521 Change-Id: I9772407554dffa91978a49a16490ef9ed448a054
Diffstat (limited to 'validation-scripts')
-rw-r--r--validation-scripts/all-nodes.sh20
1 files changed, 13 insertions, 7 deletions
diff --git a/validation-scripts/all-nodes.sh b/validation-scripts/all-nodes.sh
index 31b4d6bf..69b489b7 100644
--- a/validation-scripts/all-nodes.sh
+++ b/validation-scripts/all-nodes.sh
@@ -20,9 +20,12 @@ function ping_controller_ips() {
echo -n "Trying to ping $REMOTE_IP for local network $LOCAL_NETWORK..."
set +e
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
+ # If the first ping attempt fails, retry.
+ if ! $ping -W 300 -c 10 $REMOTE_IP &> /dev/null; then
+ echo "FAILURE"
+ echo "$REMOTE_IP is not pingable. Local Network: $LOCAL_NETWORK" >&2
+ exit 1
+ fi
fi
set -e
echo "SUCCESS"
@@ -40,10 +43,13 @@ function ping_default_gateways() {
set +e
for GW in $DEFAULT_GW; do
echo -n "Trying to ping default gateway ${GW}..."
- if ! ping -c 1 $GW &> /dev/null; then
- echo "FAILURE"
- echo "$GW is not pingable."
- exit 1
+ if ! $ping -c 1 $GW &> /dev/null; then
+ # If the first ping attempt fails, retry.
+ if ! $ping -c 10 $GW &> /dev/null; then
+ echo "FAILURE"
+ echo "$GW is not pingable."
+ exit 1
+ fi
fi
done
set -e