From c4aef429c2c5f2a407f66ecd034af7e2a79d966f Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 23 Jul 2015 23:19:33 +0200 Subject: [PATCH] dont use `consul leave` to shutdown, just kill instead If all servers in a cluster leave, the cluster is basically destroyed. Servers are supposed to just die without leaving, otherwise rejoin no longer works and manual recovery is required. Signed-off-by: Steven Armstrong --- cdist/conf/type/__consul_agent/files/consul.sysv-redhat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cdist/conf/type/__consul_agent/files/consul.sysv-redhat b/cdist/conf/type/__consul_agent/files/consul.sysv-redhat index 44fd8737..13dafd2e 100644 --- a/cdist/conf/type/__consul_agent/files/consul.sysv-redhat +++ b/cdist/conf/type/__consul_agent/files/consul.sysv-redhat @@ -38,7 +38,7 @@ start() { stop() { echo -n "Shutting down $NAME: " - "$CONSUL" leave + killproc -p "$PID_FILE" $NAME retcode=$? rm -f /var/lock/subsys/$NAME return $retcode @@ -88,7 +88,7 @@ case "$1" in fi ;; *) - echo "Usage: $NAME {start|stop|status|reload|restart}" + echo "Usage: $NAME {start|stop|status|reload|restart|condrestart|info}" exit 1 ;; esac