Increase the mariadb deploy timeout 65/5465/1
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Tue, 13 Jun 2017 14:17:56 +0000 (19:47 +0530)
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Tue, 13 Jun 2017 14:36:30 +0000 (20:06 +0530)
In some environment, mariadb is taking more than
120 seconds to completely deploy and is causing the
timeout error. so now timeout is increased to 600
with increment of 5 seconds check.

Change-Id: I08fd2f8f3c35d81b876b82aa45e052b474a8fed9
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
deploy.sh

index d2b09fa..c4cf358 100755 (executable)
--- a/deploy.sh
+++ b/deploy.sh
@@ -110,7 +110,7 @@ function pull_docker_images() {
 function wait_for_mariadb() {
     CONTAINER_NAME=$1
    
-    TIMEOUT=120
+    TIMEOUT=600
     
     # wait for the real startup
     AMOUNT_STARTUP=$($DOCKER_CMD logs ${CONTAINER_NAME} 2>&1 | grep 'mysqld: ready for connections.' | wc -l)
@@ -123,8 +123,8 @@ function wait_for_mariadb() {
         echo "ERROR: Mariadb deployment failed."
         exit 1
     fi
-    let TIMEOUT-=1
-    sleep 1       
+    let TIMEOUT-=5
+    sleep 5
     done
 }