Fix failure in router association- testcase8 97/35497/1
authortomsou <soth@intracom-telecom.com>
Thu, 25 May 2017 12:58:33 +0000 (12:58 +0000)
committerNikolas Hermanns <nikolas.hermanns@ericsson.com>
Mon, 29 May 2017 16:22:22 +0000 (16:22 +0000)
Due to some latency at the creation of the instance 8-1
somitimes the router association between  'sdnvpn-8-1-router' and net 'sdnvpn-8-2'
fails.

The case could be more robust, increasing the number of ping tries from
its current value (=1)

JIRA: SDNVPN-102

Change-Id: I3b9701c40f1221cfebc540d312b61bb881389762
Signed-off-by: tomsou <soth@intracom-telecom.com>
(cherry picked from commit 5d93773cd66119ac49d9feb171b5fc9108e53fca)

sdnvpn/lib/utils.py

index 59f641b..d28da46 100644 (file)
@@ -154,7 +154,7 @@ def generate_ping_userdata(ips_array):
             "while true; do\n"
             " for i do\n"
             "  ip=$i\n"
-            "  ping -c 1 $ip 2>&1 >/dev/null\n"
+            "  ping -c 10 $ip 2>&1 >/dev/null\n"
             "  RES=$?\n"
             "  if [ \"Z$RES\" = \"Z0\" ] ; then\n"
             "   echo ping $ip OK\n"