X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fosm_health.sh;h=651e9db2368abfe5fdd103aa84d56d3724a07604;hb=HEAD;hp=5ee3d78d9acc1d0cccdd4dd9b7c8c1cee71fddce;hpb=917ce8ceb9cfb54d4eb34ebbf2cf144b72881f26;p=osm%2Fdevops.git diff --git a/installers/osm_health.sh b/installers/osm_health.sh index 5ee3d78d..651e9db2 100755 --- a/installers/osm_health.sh +++ b/installers/osm_health.sh @@ -17,7 +17,7 @@ # Default values sampling_period=5 # seconds time_for_readiness=2 # minutes ready -time_for_failure=5 # minutes broken +time_for_failure=7 # minutes broken KUBERNETES= # By default, assumes Docker Swarm installation STACK_NAME=osm # By default, "osm" @@ -47,6 +47,12 @@ failures_in_a_row=0 oks_in_a_row=0 +# Show status of the OSM services deployed with helm +echo "helm -n ${STACK_NAME} list" +helm -n ${STACK_NAME} list +echo "helm -n ${STACK_NAME} status ${STACK_NAME}" +helm -n ${STACK_NAME} status ${STACK_NAME} + #################################################################################### # Loop to check system readiness #################################################################################### @@ -66,8 +72,8 @@ do # State of Statefulsets STS_STATE=$(kubectl get statefulset -n ${STACK_NAME} --no-headers 2>&1) - STS_READY=$(echo "${STS_STATE}" | awk '$2=="1/1" {printf ("%20s\t%s\t%s\n", $1, $2, $4)}') - STS_NOT_READY=$(echo "${STS_STATE}" | awk '$2!="1/1" {printf ("%20s\t%s\t%s\n", $1, $2, $4)}') + STS_READY=$(echo "${STS_STATE}" | awk '$2=="1/1" || $2=="2/2" || $2=="3/3" {printf ("%20s\t%s\t%s\n", $1, $2, $4)}') + STS_NOT_READY=$(echo "${STS_STATE}" | awk '$2!="1/1" && $2!="2/2" && $2!="3/3" {printf ("%20s\t%s\t%s\n", $1, $2, $4)}') COUNT_STS_READY=$(echo "${STS_READY}" | grep -v -e '^$' | wc -l) COUNT_STS_NOT_READY=$(echo "${STS_NOT_READY}" | grep -v -e '^$' | wc -l)