ctdb_check_args "$@"
-case "$1" in
- #############################
- # called when ctdbd starts up
- init)
+case "$1" in
+ init)
# make sure that we only respond to ARP messages from the NIC where
# a particular ip address is associated.
get_proc sys/net/ipv4/conf/all/arp_filter >/dev/null 2>&1 && {
drop_all_public_ips
;;
- #############################
- # called after ctdbd has done its initial recovery
- # and we start the services to become healthy
- startup)
+ startup)
monitor_interfaces
;;
-
- ################################################
- # called when ctdbd wants to claim an IP address
- takeip)
+ takeip)
iface=$2
ip=$3
maskbits=$4
flush_route_cache
;;
-
- ##################################################
- # called when ctdbd wants to release an IP address
- releaseip)
+ releaseip)
# releasing an IP is a bit more complex than it seems. Once the IP
# is released, any open tcp connections to that IP on this host will end
# up being stuck. Some of them (such as NFS connections) will be unkillable
flush_route_cache
;;
- ##################################################
- # called when ctdbd wants to update an IP address
- updateip)
+ updateip)
# moving an IP is a bit more complex than it seems.
# First we drop all traffic on the old interface.
# Then we try to add the ip to the new interface and before
# tickle all existing connections, so that dropped packets
# are retransmited and the tcp streams work
-
tickle_tcp_connections $ip
-
;;
- monitor)
+ monitor)
monitor_interfaces || exit 1
;;
*)
esac
exit 0
-