From deb99f3d1a8146019676d888f1206b4e272a10ba Mon Sep 17 00:00:00 2001 From: Benjamin Diaz Date: Mon, 27 May 2019 17:01:06 -0300 Subject: [PATCH] Adds healthcheck to POL Change-Id: I7680e9d4ba70e7d46ff155071cfb75dca64f5e35 Signed-off-by: Benjamin Diaz --- docker/POL/Dockerfile | 3 +++ installers/osm_health.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/POL/Dockerfile b/docker/POL/Dockerfile index fde710f5..6de7c717 100644 --- a/docker/POL/Dockerfile +++ b/docker/POL/Dockerfile @@ -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 diff --git a/installers/osm_health.sh b/installers/osm_health.sh index bde1a6a6..ebae8333 100755 --- a/installers/osm_health.sh +++ b/installers/osm_health.sh @@ -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 -- 2.25.1