diff options
| author | Martin Schwenke <martin@meltin.net> | 2013-08-06 12:42:13 +1000 |
|---|---|---|
| committer | Amitay Isaacs <amitay@gmail.com> | 2013-08-14 15:57:04 +1000 |
| commit | 35d9631eda65f73a8e6eb7e89142201c2d0d8d04 (patch) | |
| tree | 826069db3a16a1f80b40e1af3e40dc837e9168ec | |
| parent | b1f7337d2bf6666edb9feeab5b6be2374e765271 (diff) | |
| download | samba-35d9631eda65f73a8e6eb7e89142201c2d0d8d04.tar.gz samba-35d9631eda65f73a8e6eb7e89142201c2d0d8d04.tar.xz samba-35d9631eda65f73a8e6eb7e89142201c2d0d8d04.zip | |
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 <martin@meltin.net>
(This used to be ctdb commit 11fbf4789d783dd0bac22754b374dd9ea4b03bad)
| -rwxr-xr-x | ctdb/config/functions | 5 | ||||
| -rwxr-xr-x | ctdb/tests/eventscripts/10.interface.releaseip.011.sh | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ctdb/config/functions b/ctdb/config/functions index 087c6efb64..5aee5e5718 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 fbebadfc4b..17b7421b66 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 <<EOF Killing TCP connection 10.254.254.1:43210 ${ip}:445 $out +Waiting for 1 connections to be killed for IP ${ip} +Waiting for 1 connections to be killed for IP ${ip} +Waiting for 1 connections to be killed for IP ${ip} Timed out killing tcp connections for IP $ip EOF |
