summaryrefslogtreecommitdiffstats
path: root/ctdb/config/functions
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-08-01 14:17:50 +1000
committerAndrew Tridgell <tridge@samba.org>2008-08-01 14:17:50 +1000
commitd47fe5f83babab6ca7b0f85020c90f859a0ee338 (patch)
tree954931e10ee748dba1182261b330f62c6937cef6 /ctdb/config/functions
parentae2b9ee17fd4fed9c755802751d780ab98767786 (diff)
downloadsamba-d47fe5f83babab6ca7b0f85020c90f859a0ee338.tar.gz
samba-d47fe5f83babab6ca7b0f85020c90f859a0ee338.tar.xz
samba-d47fe5f83babab6ca7b0f85020c90f859a0ee338.zip
ensure we use killtcp on non-NFS/non-CIFS ports for faster failover of
other protocols (This used to be ctdb commit aefcb1f817581ac8cd67712d07159fc802f96623)
Diffstat (limited to 'ctdb/config/functions')
-rw-r--r--ctdb/config/functions10
1 files changed, 9 insertions, 1 deletions
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