summaryrefslogtreecommitdiffstats
path: root/lava-slave/scripts
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2018-08-09 15:19:08 +0200
committerCorentin LABBE <clabbe@baylibre.com>2018-08-09 15:19:08 +0200
commit5c941bca8f080c20e8fea32ebb3b781caa024ebc (patch)
tree84902a51e7795387f99b7170ab26b28899d7eeac /lava-slave/scripts
parentcbfe5a606fa2999b3654d482910719032b39101d (diff)
lava-slave: increase connect to master timeout
When trying to detect if master is up, we have set a timeout of 60s. This is good for most of the time, but when the master is restoring a database, 60s is not enougth. This patch increase timeout to 300s.
Diffstat (limited to 'lava-slave/scripts')
-rwxr-xr-xlava-slave/scripts/setup.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/lava-slave/scripts/setup.sh b/lava-slave/scripts/setup.sh
index e7992c0..e688c9e 100755
--- a/lava-slave/scripts/setup.sh
+++ b/lava-slave/scripts/setup.sh
@@ -15,17 +15,18 @@ cd /root/lavacli
LAVACLIOPTS="--uri $LAVA_MASTER_URI"
# do a sort of ping for letting master to be up
-TIMEOUT=30
+TIMEOUT=300
while [ $TIMEOUT -ge 1 ];
do
+ STEP=2
lavacli $LAVACLIOPTS device-types list 2>/dev/null >/dev/null
if [ $? -eq 0 ];then
TIMEOUT=0
else
echo "Wait for master...."
- sleep 2
+ sleep $STEP
fi
- TIMEOUT=$(($TIMEOUT-1))
+ TIMEOUT=$(($TIMEOUT-$STEP))
done
# This directory is used for storing device-types already added