From e4ec6e9d6b7ff7bfcabdba6825bb650e80652f40 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Thu, 18 Oct 2007 14:13:48 +1000 Subject: [PATCH] flush the route cache when we have added the single public ip to the node cleanup and remove everything when we do a shutdown event (This used to be ctdb commit 221432f45073bc7624803058c8bbf18838e7ceeb) --- ctdb/config/events.d/90.ipmux | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ctdb/config/events.d/90.ipmux b/ctdb/config/events.d/90.ipmux index 0ffefc4745f..253d8e746b1 100755 --- a/ctdb/config/events.d/90.ipmux +++ b/ctdb/config/events.d/90.ipmux @@ -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) -- 2.47.3