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 export CTDB_BASE
=$
(cd -P $
(dirname "$0") ; dirname "$PWD")
13 .
$CTDB_BASE/functions
16 if [ -z "$CTDB_PUBLIC_ADDRESSES" ] ; then
20 if [ ! -f "$CTDB_PUBLIC_ADDRESSES" ] ; then
21 if [ "$1" = "init" ]; then
22 echo "No public addresses file found. Nothing to do for 10.interfaces.external"
27 takeover_assigned_ips
()
32 awk -F'|' '{print $2}' |
34 if [ -n "$(ip_maskbits_iface $ip)" ] ; then
35 echo "Assigning $ip to this node ($pnn)"
36 ctdb moveip
"$ip" "$pnn"