3 # Eventscript for CTDB to cope with externally managed public IP addresses
5 # If DisableIPFailover is set:
7 # * 10.interface must be disabled.
8 # * For connection tracking/killing to work this script must be enabled.
10 [ -n "$CTDB_BASE" ] || \
11 CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
13 . "${CTDB_BASE}/functions"
17 if [ -z "$CTDB_PUBLIC_ADDRESSES" ] ; then
21 if [ ! -f "$CTDB_PUBLIC_ADDRESSES" ] ; then
22 if [ "$1" = "init" ]; then
23 echo "No public addresses file found. Nothing to do for 10.interfaces.external"
28 takeover_assigned_ips ()
33 awk -F'|' '{print $2}' |
35 _ip_details=$(ip_maskbits_iface "$ip")
36 if [ -n "$_ip_details" ] ; then
37 echo "Assigning $ip to this node (${_pnn})"
38 $CTDB moveip "$ip" "$_pnn"