Lower sleep times during controller startup 48/61448/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 9 Aug 2017 19:16:12 +0000 (21:16 +0200)
committerVratko Polák <vrpolak@cisco.com>
Mon, 14 Aug 2017 12:07:10 +0000 (12:07 +0000)
This lowers the sleep time between each try to ping the controller,
while retaining the message output at every 5 seconds.

Change-Id: I7c9cf4ce56f2645b6f26a4307b6df6f7386e1c5a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
csit/suites/sxp/scripts/tools_node_setup.sh

index f6a0cea213bc961fde906dec163cdef87460e881..18883a7d75dea911cd7b19460e5d15deee35ac1e 100755 (executable)
@@ -37,8 +37,10 @@ while true; do
         echo Timeout Controller DOWN
         exit 1
     else
         echo Timeout Controller DOWN
         exit 1
     else
-        COUNT=$(( ${COUNT} + 5 ))
-        sleep 5
-        echo waiting ${COUNT} secs...
+        COUNT=$(( ${COUNT} + 1 ))
+        sleep 1
+        if [[ $(($COUNT % 5)) == 0 ]]; then
+            echo already waited ${COUNT} seconds...
+        fi
     fi
 done
     fi
 done