From a8416d5eb4b64c7d7ed3b3c70d5013635d23bca6 Mon Sep 17 00:00:00 2001 From: weekface Date: Wed, 14 Aug 2019 19:21:38 +0800 Subject: [PATCH] fix pump offline: pump progress will exit with 0 if offline --- 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 79c37350494..815fcbcf656 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 "pump offline, please delete my pod" + tail -f /dev/null +fi