From d47fe5f83babab6ca7b0f85020c90f859a0ee338 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 1 Aug 2008 14:17:50 +1000 Subject: ensure we use killtcp on non-NFS/non-CIFS ports for faster failover of other protocols (This used to be ctdb commit aefcb1f817581ac8cd67712d07159fc802f96623) --- ctdb/config/functions | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ctdb/config/functions b/ctdb/config/functions index 20325b1812..5df121f731 100644 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -229,8 +229,16 @@ kill_tcp_connections() { srcport=`echo $src | cut -d: -f2` destip=`echo $dest | cut -d: -f1` destport=`echo $dest | cut -d: -f2` - ctdb killtcp $srcip:$srcport $destip:$destport >/dev/null 2>&1 || _failed=1 echo "Killing TCP connection $srcip:$srcport $destip:$destport" + ctdb killtcp $srcip:$srcport $destip:$destport >/dev/null 2>&1 || _failed=1 + case $destport in + # we only do one-way killtcp for NFS and CIFS + 139|445|2049) : ;; + # for all others we do 2-way + *) + ctdb killtcp $destip:$destport $srcip:$srcport >/dev/null 2>&1 || _failed=1 + ;; + esac _killcount=`expr $_killcount + 1` done < $connfile /bin/rm -f $connfile -- cgit