From 3ba3e56dd92e6f5e45ec05fbafa5546f5c2bde12 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Sat, 14 Oct 2017 08:17:04 +0200 Subject: [PATCH 1/3] Reinstates the liveness probes from #65 --- zookeeper/50pzoo.yml | 6 ++++++ zookeeper/51zoo.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/zookeeper/50pzoo.yml b/zookeeper/50pzoo.yml index 6c0767b5..de82a086 100644 --- a/zookeeper/50pzoo.yml +++ b/zookeeper/50pzoo.yml @@ -49,6 +49,12 @@ spec: - /bin/sh - -c - '[ "imok" = "$(echo ruok | nc -w 1 -q 1 127.0.0.1 2181)" ]' + livenessProbe: + exec: + command: + - /bin/sh + - -c + - '[ "imok" = "$(echo ruok | nc -w 1 127.0.0.1 2181)" ]' volumeMounts: - name: config mountPath: /etc/kafka diff --git a/zookeeper/51zoo.yml b/zookeeper/51zoo.yml index c790ec24..1f5be6ae 100644 --- a/zookeeper/51zoo.yml +++ b/zookeeper/51zoo.yml @@ -52,6 +52,12 @@ spec: - /bin/sh - -c - '[ "imok" = "$(echo ruok | nc -w 1 -q 1 127.0.0.1 2181)" ]' + livenessProbe: + exec: + command: + - /bin/sh + - -c + - '[ "imok" = "$(echo ruok | nc -w 1 127.0.0.1 2181)" ]' volumeMounts: - name: config mountPath: /etc/kafka From fd372f4324691cab974ca3b6f311ed7f05e62b8e Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Sat, 14 Oct 2017 08:17:58 +0200 Subject: [PATCH 2/3] Applies the fix from #74 to liveness as well --- zookeeper/50pzoo.yml | 2 +- zookeeper/51zoo.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zookeeper/50pzoo.yml b/zookeeper/50pzoo.yml index de82a086..2e052c4b 100644 --- a/zookeeper/50pzoo.yml +++ b/zookeeper/50pzoo.yml @@ -54,7 +54,7 @@ spec: command: - /bin/sh - -c - - '[ "imok" = "$(echo ruok | nc -w 1 127.0.0.1 2181)" ]' + - '[ "imok" = "$(echo ruok | nc -w 1 -q 1 127.0.0.1 2181)" ]' volumeMounts: - name: config mountPath: /etc/kafka diff --git a/zookeeper/51zoo.yml b/zookeeper/51zoo.yml index 1f5be6ae..6f16e805 100644 --- a/zookeeper/51zoo.yml +++ b/zookeeper/51zoo.yml @@ -57,7 +57,7 @@ spec: command: - /bin/sh - -c - - '[ "imok" = "$(echo ruok | nc -w 1 127.0.0.1 2181)" ]' + - '[ "imok" = "$(echo ruok | nc -w 1 -q 1 127.0.0.1 2181)" ]' volumeMounts: - name: config mountPath: /etc/kafka From e2d01cc864c14314b8f0cb1a268017af93deab26 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Sat, 14 Oct 2017 08:19:38 +0200 Subject: [PATCH 3/3] Allows a longer timeout for liveness, in case the node is very busy etc --- zookeeper/50pzoo.yml | 2 +- zookeeper/51zoo.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zookeeper/50pzoo.yml b/zookeeper/50pzoo.yml index 2e052c4b..088615f8 100644 --- a/zookeeper/50pzoo.yml +++ b/zookeeper/50pzoo.yml @@ -54,7 +54,7 @@ spec: command: - /bin/sh - -c - - '[ "imok" = "$(echo ruok | nc -w 1 -q 1 127.0.0.1 2181)" ]' + - '[ "imok" = "$(echo ruok | nc -w 5 -q 1 127.0.0.1 2181)" ]' volumeMounts: - name: config mountPath: /etc/kafka diff --git a/zookeeper/51zoo.yml b/zookeeper/51zoo.yml index 6f16e805..2a047335 100644 --- a/zookeeper/51zoo.yml +++ b/zookeeper/51zoo.yml @@ -57,7 +57,7 @@ spec: command: - /bin/sh - -c - - '[ "imok" = "$(echo ruok | nc -w 1 -q 1 127.0.0.1 2181)" ]' + - '[ "imok" = "$(echo ruok | nc -w 5 -q 1 127.0.0.1 2181)" ]' volumeMounts: - name: config mountPath: /etc/kafka