From 35d9631eda65f73a8e6eb7e89142201c2d0d8d04 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 6 Aug 2013 12:42:13 +1000 Subject: [PATCH] eventscripts: Print a message when waiting for TCP connections to be killed This makes the gaps in the logs more obvious. Signed-off-by: Martin Schwenke (This used to be ctdb commit 11fbf4789d783dd0bac22754b374dd9ea4b03bad) --- ctdb/config/functions | 5 ++++- ctdb/tests/eventscripts/10.interface.releaseip.011.sh | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ctdb/config/functions b/ctdb/config/functions index 087c6efb642..5aee5e57186 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -696,7 +696,9 @@ kill_tcp_connections () _count=0 while : ; do - if [ -z "$(get_tcp_connections_for_ip $_ip)" ] ; then + _remaining=$(get_tcp_connections_for_ip $_ip | wc -l) + + if [ $_remaining -eq 0 ] ; then echo "Killed $_killcount TCP connections to released IP $_ip" return fi @@ -707,6 +709,7 @@ kill_tcp_connections () return fi + echo "Waiting for $_remaining connections to be killed for IP $_ip" sleep 1 done } diff --git a/ctdb/tests/eventscripts/10.interface.releaseip.011.sh b/ctdb/tests/eventscripts/10.interface.releaseip.011.sh index fbebadfc4ba..17b7421b669 100755 --- a/ctdb/tests/eventscripts/10.interface.releaseip.011.sh +++ b/ctdb/tests/eventscripts/10.interface.releaseip.011.sh @@ -31,6 +31,9 @@ while read dev ip bits ; do ok <