Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix connections check in teardown script #608

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker/bin/zookeeperTeardown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading