From: garciadeblas Date: Wed, 8 Jul 2020 11:38:29 +0000 (+0000) Subject: full_install_osm.sh: fix check loop in install_helm X-Git-Tag: v8.0.0rc3~22 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=3235e6b7ef38a89cf7543df5a41d61e7792a986b;p=osm%2Fdevops.git full_install_osm.sh: fix check loop in install_helm Change-Id: I546a7219882b4487031ef7093ec070422d8de8d0 Signed-off-by: garciadeblas --- diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index e0ee3cff..1d06566c 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -825,6 +825,7 @@ function install_helm() { helm > /dev/null 2>&1 if [ $? != 0 ] ; then # Helm is not installed. Install helm + echo "Helm is not installed, installing ..." curl https://get.helm.sh/helm-v2.15.2-linux-amd64.tar.gz --output helm-v2.15.2.tar.gz tar -zxvf helm-v2.15.2.tar.gz sudo mv linux-amd64/helm /usr/local/bin/helm @@ -842,14 +843,17 @@ function install_helm() { helm init --service-account tiller # Wait for Tiller to be up and running. If timeout expires, continue installing - tiller_timeout=120; counter=0 + tiller_timeout=120; + counter=0; + tiller_status="" while (( counter < tiller_timeout )) do tiller_status=`kubectl -n kube-system get deployment.apps/tiller-deploy --no-headers | awk '{print $2'}` - ( [ ! -z "$tiller_status" ] && [ $tiller_status == "1/1" ] ) && break - num=$((counter + 2)) - sleep 2 + ( [ ! -z "$tiller_status" ] && [ $tiller_status == "1/1" ] ) && echo "Tiller ready" && break + counter=$((counter + 5)) + sleep 5 done + [ "$tiller_status" != "1/1" ] && echo "Tiller is NOT READY YET. Installation will continue" fi }