Skip to content

Commit 6c1a108

Browse files
committed
Fix connections check in teardown script
conns may return the following error: This ZooKeeper instance is not currently serving requests Signed-off-by: Azat Khuzhin <[email protected]>
1 parent a9b059d commit 6c1a108

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docker/bin/zookeeperTeardown.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ DATA_DIR=/data
1818
MYID_FILE=$DATA_DIR/myid
1919
LOG4J_CONF=/conf/log4j-quiet.properties
2020

21-
# Wait for client connections to drain. Kubernetes will wait until the confiugred
21+
# Wait for client connections to drain. Kubernetes will wait until the configured
2222
# "terminationGracePeriodSeconds" before focibly killing the container
2323
for (( i = 0; i < 6; i++ )); do
24-
CONN_COUNT=`echo cons | socat stdio tcp:localhost:$CLIENT_PORT | grep -v "^$" |grep -v "/127.0.0.1:" | wc -l`
24+
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`
2525
if [[ "$CONN_COUNT" -gt 0 ]]; then
2626
echo "$CONN_COUNT non-local connections still connected."
2727
sleep 5

0 commit comments

Comments
 (0)