From: beierlm Date: Fri, 25 Mar 2022 16:23:36 +0000 (-0400) Subject: Bug 1932: Fix ready check X-Git-Tag: v11.0.3~8 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F11789%2F2;p=osm%2Fdevops.git Bug 1932: Fix ready check Changes to juju result in human readable output no longer being applicable for the deployment completion check. Changes to use json output instead. Fixes Bug 1932 Change-Id: I65358c7f472956ed4238a5a61cceb1651d88feff Signed-off-by: beierlm (cherry picked from commit 67a3447f8a7a25812b4efecfd9be5dafd4f0e293) --- diff --git a/installers/charmed_install.sh b/installers/charmed_install.sh index 81ede58c..52f07f33 100755 --- a/installers/charmed_install.sh +++ b/installers/charmed_install.sh @@ -295,7 +295,7 @@ function check_osm_deployed() { previous_count=0 while true do - service_count=$(juju status -m $MODEL_NAME | grep kubernetes | grep active | wc -l) + service_count=$(juju status --format json -m $MODEL_NAME | jq '.applications[]."application-status".current' | grep active | wc -l) echo "$service_count / $total_service_count services active" if [ $service_count -eq $total_service_count ]; then break diff --git a/installers/charmed_uninstall.sh b/installers/charmed_uninstall.sh index 09305d2a..20ca7b6e 100755 --- a/installers/charmed_uninstall.sh +++ b/installers/charmed_uninstall.sh @@ -14,7 +14,7 @@ # -juju destroy-model osm --destroy-storage -y --force --no-wait +juju destroy-model osm --destroy-storage -y --force sudo snap unalias osm sudo snap remove osmclient CONTROLLER_NAME="osm-vca"