Updating healthcheck for kafka and zookeeper 13/9113/1
authorFelipe Vicens <felipe.vicens@atos.net>
Wed, 17 Jun 2020 16:37:18 +0000 (18:37 +0200)
committervicens <felipe.vicens@atos.net>
Thu, 18 Jun 2020 14:06:47 +0000 (16:06 +0200)
Change-Id: Icb2e2930a3866cae9196c428e4de180088fdd749
Signed-off-by: Felipe Vicens <felipe.vicens@atos.net>
(cherry picked from commit adf35b574270cb0c221d45fdc51d67b8fefb0d09)

installers/docker/docker-compose.yaml

index 25ed061..fe15b8a 100644 (file)
@@ -40,10 +40,10 @@ services:
     networks:
       - netOSM
     healthcheck:
-      test: echo stat | nc localhost 2181
-      interval: 10s
+      test: echo ruok | nc -w 2 localhost 2181
+      interval: 20s
       timeout: 10s
-      retries: 3
+      retries: 5
     logging:
       driver: "json-file"
       options:
@@ -70,7 +70,7 @@ services:
     volumes:
       - /var/run/docker.sock:/var/run/docker.sock
     healthcheck:
-      test: zookeeper-shell.sh zookeeper:2181 ls /brokers/ids 2>&1 | grep "Node does not exist" && exit 1 || exit 0
+      test: echo ruok | nc -w 2 zookeeper 2181
       interval: 20s
       timeout: 10s
       retries: 5