From: Martin Schwenke Date: Fri, 18 Dec 2015 02:16:27 +0000 (+1100) Subject: ctdb-scripts: Superficial clean-ups to 10.interface X-Git-Url: http://git.samba.org/?p=obnox%2Fsamba%2Fsamba-obnox.git;a=commitdiff_plain;h=20838833f3fe3053c7f6aed8ac598319a3ecc346 ctdb-scripts: Superficial clean-ups to 10.interface Whitespace and indentation improvements. Remove comments describing events, since the README covers that much better. Signed-off-by: Martin Schwenke Reviewed-by: Michael Adam --- diff --git a/ctdb/config/events.d/10.interface b/ctdb/config/events.d/10.interface index 0cd11123f1d..4b9f31c5a2b 100755 --- a/ctdb/config/events.d/10.interface +++ b/ctdb/config/events.d/10.interface @@ -194,10 +194,8 @@ get_iface_ip_maskbits_family () 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 && { @@ -213,17 +211,11 @@ case "$1" in 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 @@ -242,10 +234,7 @@ case "$1" in 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 @@ -275,9 +264,7 @@ case "$1" in 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 @@ -320,12 +307,10 @@ case "$1" in # 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 ;; *) @@ -334,4 +319,3 @@ case "$1" in esac exit 0 -