]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
flush the route cache when we have added the single public ip to the
authorRonnie Sahlberg <sahlberg@ronnie>
Thu, 18 Oct 2007 04:13:48 +0000 (14:13 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Thu, 18 Oct 2007 04:13:48 +0000 (14:13 +1000)
node

cleanup and remove everything when we do a shutdown event

(This used to be ctdb commit 221432f45073bc7624803058c8bbf18838e7ceeb)

ctdb/config/events.d/90.ipmux

index 0ffefc4745f8afff05f2d787352c60e112429a35..253d8e746b16ebba68aff13b7f0f2f8e08359bee 100755 (executable)
@@ -22,6 +22,17 @@ case $cmd in
        ;;
 
      shutdown)
+       # remove the ip
+       ip addr del $CTDB_SINGLE_PUBLIC_IP/32 dev lo >/dev/null 2>/dev/null
+
+       # remove any iptables rules
+       /sbin/iptables -D INPUT -i $CTDB_PUBLIC_INTERFACE -d $CTDB_SINGLE_PUBLIC_IP -j DROP 2> /dev/null
+
+       # kill off any ipmux processes
+       killall -9 ctdb_ipmux >/dev/null 2>/dev/null
+
+       # flush our route cache
+       echo 1 > /proc/sys/net/ipv4/route/flush
        ;;
 
      takeip)
@@ -63,6 +74,9 @@ case $cmd in
        iptables -I INPUT 1 -d $CTDB_SINGLE_PUBLIC_IP -i $CTDB_PUBLIC_INTERFACE -j QUEUE >/dev/null 2>/dev/null
 
        ctdb_ipmux &
+
+       # flush our route cache
+       echo 1 > /proc/sys/net/ipv4/route/flush
        ;;
 
       monitor)