diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2018-08-09 15:19:08 +0200 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2018-08-09 15:19:08 +0200 |
commit | 5c941bca8f080c20e8fea32ebb3b781caa024ebc (patch) | |
tree | 84902a51e7795387f99b7170ab26b28899d7eeac /lava-slave/scripts/setup.sh | |
parent | cbfe5a606fa2999b3654d482910719032b39101d (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/setup.sh')
-rwxr-xr-x | lava-slave/scripts/setup.sh | 7 |
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 |