From: garciadeblas Date: Fri, 3 Jul 2020 15:32:05 +0000 (+0000) Subject: Added health check after installation before exit X-Git-Tag: v8.0.0rc2~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=d32b787c94e8fef04a02a3bfd6ac8d65dd5e027f;p=osm%2Fdevops.git Added health check after installation before exit Change-Id: Ib0bd42e412846f4224feeaa8b3124e93e84be437 Signed-off-by: garciadeblas --- diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index af618731..914b7d85 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -864,7 +864,7 @@ function parse_yaml() { function namespace_vol() { osm_services="nbi lcm ro pol mon kafka mongo mysql" for osm in $osm_services; do - $WORKDIR_SUDO sed -i "s#path: /var/lib/osm#path: $OSM_NAMESPACE_VOL#g" $OSM_K8S_WORK_DIR/$osm.yaml + $WORKDIR_SUDO sed -i "s#path: /var/lib/osm#path: $OSM_NAMESPACE_VOL#g" $OSM_K8S_WORK_DIR/$osm.yaml done } @@ -1188,6 +1188,20 @@ EOF [ -z "$INSTALL_NOHOSTCLIENT" ] && install_osmclient track osmclient + + echo -e "Checking OSM health state..." + if [ -n "$KUBERNETES" ]; then + $OSM_DEVOPS/installers/osm_health.sh -s ${OSM_STACK_NAME} -k || \ + echo -e "OSM is not healthy, but will probably converge to a healthy state soon." && \ + echo -e "Check OSM status with: kubectl -n ${OSM_STACK_NAME} get all" && \ + track osm_unhealthy + else + $OSM_DEVOPS/installers/osm_health.sh -s ${OSM_STACK_NAME} || \ + echo -e "OSM is not healthy, but will probably converge to a healthy state soon." && \ + echo -e "Check OSM status with: docker service ls; docker stack ps ${OSM_STACK_NAME}" && \ + track osm_unhealthy + fi + track after_healthcheck wget -q -O- https://osm-download.etsi.org/ftp/osm-8.0-eight/README2.txt &> /dev/null track end