projects
/
osm
/
devops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pulls Elasticsearch Curator image during installation process
[osm/devops.git]
/
installers
/
osm_health.sh
diff --git
a/installers/osm_health.sh
b/installers/osm_health.sh
index
4625dc8
..
2684af7
100755
(executable)
--- a/
installers/osm_health.sh
+++ b/
installers/osm_health.sh
@@
-1,8
+1,9
@@
#!/bin/sh
#!/bin/sh
-WAIT_TIME=60
-NUM_SERVICES_WITH_HEALTH=3
-SERVICES_WITH_HEALTH="nbi ro kafka"
+WAIT_TIME=180 # LCM healthcheck needs 140 senconds
+SERVICES_WITH_HEALTH="nbi ro zookeeper lcm"
+NUM_SERVICES_WITH_HEALTH=$(echo $SERVICES_WITH_HEALTH | wc -w)
+WAIT_FINAL=30
while getopts "w:s:n:c:" o; do
case "${o}" in
while getopts "w:s:n:c:" o; do
case "${o}" in
@@
-23,9
+24,12
@@
done
time=0
time=0
-step=
1
+step=
2
while [ $time -le "$WAIT_TIME" ]; do
if [ "$(docker ps | grep " ${STACK_NAME}_" | grep -i healthy | wc -l)" -ge "$NUM_SERVICES_WITH_HEALTH" ]; then
while [ $time -le "$WAIT_TIME" ]; do
if [ "$(docker ps | grep " ${STACK_NAME}_" | grep -i healthy | wc -l)" -ge "$NUM_SERVICES_WITH_HEALTH" ]; then
+ # all dockers are healthy now.
+ # final sleep is needed until more health checks are added to validate system is ready to handle requests
+ sleep $WAIT_FINAL
exit 0
fi
exit 0
fi