From 77b195963bd34dd1d70f1a925f8c4bfc9e350eeb Mon Sep 17 00:00:00 2001 From: mittachaitu Date: Tue, 10 Dec 2019 17:42:50 +0530 Subject: [PATCH 1/4] fix(cstor-pool-mgmt): fix livenessprobe in cstor pool Signed-off-by: mittachaitu --- pkg/install/v1alpha1/cstor_pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/install/v1alpha1/cstor_pool.go b/pkg/install/v1alpha1/cstor_pool.go index 2fe251d2c1..c7ab647854 100644 --- a/pkg/install/v1alpha1/cstor_pool.go +++ b/pkg/install/v1alpha1/cstor_pool.go @@ -260,7 +260,7 @@ spec: command: - /bin/sh - -c - - zfs set io.openebs:livenesstimestamp="$(date +%s)" cstor-$OPENEBS_IO_CSTOR_ID + - timeout 30 zfs set io.openebs:livenesstimestamp="$(date +%s)" cstor-$OPENEBS_IO_CSTOR_ID failureThreshold: 3 initialDelaySeconds: 300 periodSeconds: 10 From b6d8290c32e95f49c0e3de143c3c0382266e5351 Mon Sep 17 00:00:00 2001 From: mittachaitu Date: Wed, 11 Dec 2019 13:11:46 +0530 Subject: [PATCH 2/4] This commit adds comment to the code Signed-off-by: mittachaitu --- pkg/install/v1alpha1/cstor_pool.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/install/v1alpha1/cstor_pool.go b/pkg/install/v1alpha1/cstor_pool.go index c7ab647854..463f2dd8e1 100644 --- a/pkg/install/v1alpha1/cstor_pool.go +++ b/pkg/install/v1alpha1/cstor_pool.go @@ -260,6 +260,8 @@ spec: command: - /bin/sh - -c + ## timeout 30 is added to exit the command forcefully with non-zero exit code if command takes + ## more than 30 seconds - timeout 30 zfs set io.openebs:livenesstimestamp="$(date +%s)" cstor-$OPENEBS_IO_CSTOR_ID failureThreshold: 3 initialDelaySeconds: 300 From 6533dbd2ab15d979192119ba64badcb0df856b0f Mon Sep 17 00:00:00 2001 From: mittachaitu Date: Wed, 11 Dec 2019 16:48:51 +0530 Subject: [PATCH 3/4] This commit updates the timeout settings in livenessprobe Signed-off-by: mittachaitu --- pkg/install/v1alpha1/cstor_pool.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkg/install/v1alpha1/cstor_pool.go b/pkg/install/v1alpha1/cstor_pool.go index 463f2dd8e1..fa7f02603d 100644 --- a/pkg/install/v1alpha1/cstor_pool.go +++ b/pkg/install/v1alpha1/cstor_pool.go @@ -260,13 +260,17 @@ spec: command: - /bin/sh - -c - ## timeout 30 is added to exit the command forcefully with non-zero exit code if command takes - ## more than 30 seconds - - timeout 30 zfs set io.openebs:livenesstimestamp="$(date +%s)" cstor-$OPENEBS_IO_CSTOR_ID + ## timeout 120 is added to exit the command forcefully with non-zero exit code if command takes + ## more than 120 seconds to process it. + - timeout 120 zfs set io.openebs:livenesstimestamp="$(date +%s)" cstor-$OPENEBS_IO_CSTOR_ID failureThreshold: 3 initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 + ## how often (in seconds) to perform the probe + periodSeconds: 60 + ## Number of seconds after which the probe times out. i.e informing + ## to kubelet probe should timeout after 150 seconds(Note: It will + ## not honour because of timeout 120 value before command) + timeoutSeconds: 150 securityContext: privileged: true volumeMounts: From 4f8c856401cb32381bcb38b146450cce0525d20e Mon Sep 17 00:00:00 2001 From: mittachaitu Date: Wed, 11 Dec 2019 17:19:56 +0530 Subject: [PATCH 4/4] This commit updates the comment Signed-off-by: mittachaitu --- pkg/install/v1alpha1/cstor_pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/install/v1alpha1/cstor_pool.go b/pkg/install/v1alpha1/cstor_pool.go index fa7f02603d..a7f37936fb 100644 --- a/pkg/install/v1alpha1/cstor_pool.go +++ b/pkg/install/v1alpha1/cstor_pool.go @@ -261,7 +261,7 @@ spec: - /bin/sh - -c ## timeout 120 is added to exit the command forcefully with non-zero exit code if command takes - ## more than 120 seconds to process it. + ## more than 120 seconds. - timeout 120 zfs set io.openebs:livenesstimestamp="$(date +%s)" cstor-$OPENEBS_IO_CSTOR_ID failureThreshold: 3 initialDelaySeconds: 300