diff --git a/docker/bin/zookeeperTeardown.sh b/docker/bin/zookeeperTeardown.sh index da361b8d..60e52e22 100755 --- a/docker/bin/zookeeperTeardown.sh +++ b/docker/bin/zookeeperTeardown.sh @@ -18,10 +18,10 @@ DATA_DIR=/data MYID_FILE=$DATA_DIR/myid LOG4J_CONF=/conf/log4j-quiet.properties -# Wait for client connections to drain. Kubernetes will wait until the confiugred +# Wait for client connections to drain. Kubernetes will wait until the configured # "terminationGracePeriodSeconds" before focibly killing the container for (( i = 0; i < 6; i++ )); do - CONN_COUNT=`echo cons | socat stdio tcp:localhost:$CLIENT_PORT | grep -v "^$" |grep -v "/127.0.0.1:" | wc -l` + CONN_COUNT=`echo cons | socat stdio tcp:localhost:$CLIENT_PORT | grep -v "^$" |grep -v -e "/127.0.0.1:" -e "This ZooKeeper instance is not currently serving requests" | wc -l` if [[ "$CONN_COUNT" -gt 0 ]]; then echo "$CONN_COUNT non-local connections still connected." sleep 5