Adds healthcheck to POL 58/7558/1
authorBenjamin Diaz <bdiaz@whitestack.com>
Mon, 27 May 2019 20:01:06 +0000 (17:01 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Mon, 27 May 2019 20:01:06 +0000 (17:01 -0300)
Change-Id: I7680e9d4ba70e7d46ff155071cfb75dca64f5e35
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
docker/POL/Dockerfile
installers/osm_health.sh

index fde710f..6de7c71 100644 (file)
@@ -55,4 +55,7 @@ ENV OSMPOL_SQL_DATABASE_URI sqlite:///mon_sqlite.db
 
 ENV OSMPOL_GLOBAL_LOG_LEVEL INFO
 
+HEALTHCHECK --interval=5s --timeout=2s --retries=12 \
+  CMD osm-pol-healthcheck || exit 1
+
 CMD /bin/bash scripts/start.sh
index bde1a6a..ebae833 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 WAIT_TIME=340  # LCM healthcheck needs 2x(30+140) senconds
-SERVICES_WITH_HEALTH="nbi ro zookeeper lcm mon light-ui"
+SERVICES_WITH_HEALTH="nbi ro zookeeper lcm mon light-ui pol"
 NUM_SERVICES_WITH_HEALTH=$(echo $SERVICES_WITH_HEALTH | wc -w)
 WAIT_FINAL=30