From 2e70a739d3ea04c5f2e12dd05d664cce84833842 Mon Sep 17 00:00:00 2001 From: weekface Date: Fri, 16 Aug 2019 11:17:49 +0800 Subject: [PATCH] fix pump offline: pump progress will exit with 0 if offline (#769) --- charts/tidb-cluster/templates/scripts/_start_pump.sh.tpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/tidb-cluster/templates/scripts/_start_pump.sh.tpl b/charts/tidb-cluster/templates/scripts/_start_pump.sh.tpl index 79c3735049..df3bf7fcb3 100644 --- a/charts/tidb-cluster/templates/scripts/_start_pump.sh.tpl +++ b/charts/tidb-cluster/templates/scripts/_start_pump.sh.tpl @@ -5,3 +5,8 @@ set -euo pipefail -advertise-addr=`echo ${HOSTNAME}`.{{ template "cluster.name" . }}-pump:8250 \ -config=/etc/pump/pump.toml \ -log-file= + +if [ $? == 0 ]; then + echo $(date -u +"[%Y/%m/%d %H:%M:%S.%3N %:z]") "pump offline, please delete my pod" + tail -f /dev/null +fi