Updating healthcheck for kafka and zookeeper 07/9107/2
authorFelipe Vicens <felipe.vicens@atos.net>
Wed, 17 Jun 2020 16:37:18 +0000 (18:37 +0200)
committerFelipe Vicens <felipe.vicens@atos.net>
Wed, 17 Jun 2020 16:41:13 +0000 (18:41 +0200)
Change-Id: Icb2e2930a3866cae9196c428e4de180088fdd749
Signed-off-by: Felipe Vicens <felipe.vicens@atos.net>
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