From 2bd1648f1c26b8d24dcfe858f164fc160159b331 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 25 Jul 2017 17:02:40 +0200 Subject: [PATCH 1/3] Nodetool drain on preStop --- production/jaeger-production-template.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/production/jaeger-production-template.yml b/production/jaeger-production-template.yml index 4a1c51d..8d58c49 100644 --- a/production/jaeger-production-template.yml +++ b/production/jaeger-production-template.yml @@ -54,6 +54,7 @@ items: app: cassandra jaeger-infra: cassandra-replica spec: + terminationGracePeriodSeconds: 1800 containers: - name: cassandra image: cassandra:3.11 @@ -74,7 +75,7 @@ items: lifecycle: preStop: exec: - command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"] + command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done", "nodetool drain"] env: - name: MAX_HEAP_SIZE value: 512M From 59cbb7a8923da151398aa4ea73d39781cbd6f07d Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 26 Jul 2017 10:34:26 +0200 Subject: [PATCH 2/3] Use only nodetool drain in preStop --- production/jaeger-production-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production/jaeger-production-template.yml b/production/jaeger-production-template.yml index 8d58c49..c069e77 100644 --- a/production/jaeger-production-template.yml +++ b/production/jaeger-production-template.yml @@ -75,7 +75,7 @@ items: lifecycle: preStop: exec: - command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done", "nodetool drain"] + command: ["/bin/sh", "-c", "nodetool drain"] env: - name: MAX_HEAP_SIZE value: 512M From f709d43cb61c7e9d168b8316085baff467225b5f Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 26 Jul 2017 11:05:22 +0200 Subject: [PATCH 3/3] fix minikube --- travis/install-start-minikube.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/install-start-minikube.sh b/travis/install-start-minikube.sh index ee5a72b..efd8e78 100755 --- a/travis/install-start-minikube.sh +++ b/travis/install-start-minikube.sh @@ -24,7 +24,7 @@ mkdir $HOME/.kube || true touch $HOME/.kube/config export KUBECONFIG=$HOME/.kube/config -sudo -E ./minikube start --vm-driver=none --use-vendored-driver +sudo -E ./minikube start --vm-driver=none # this for loop waits until kubectl can access the api server that minikube has created for i in {1..150} # timeout for 5 minutes