mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
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)
This commit is contained in:
parent
b1f7337d2b
commit
35d9631eda
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user