Skip to content

Commit

Permalink
ctdb-scripts: Move monitoring of CTDB_NATGW_PUBLIC_IFACE to 11.natgw
Browse files Browse the repository at this point in the history
The NAT gateway code should be self-contained.

Signed-off-by: Martin Schwenke <[email protected]>
Reviewed-by: Amitay Isaacs <[email protected]>
  • Loading branch information
martin-schwenke authored and Amitay Isaacs committed Jan 25, 2016
1 parent df5845c commit 638117c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion ctdb/config/events.d/10.interface
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ get_all_interfaces ()

# Add some special interfaces if they're defined
[ "$CTDB_PUBLIC_INTERFACE" ] && all_interfaces="$CTDB_PUBLIC_INTERFACE $all_interfaces"
[ "$CTDB_NATGW_PUBLIC_IFACE" ] && all_interfaces="$CTDB_NATGW_PUBLIC_IFACE $all_interfaces"

# Get the interfaces for which CTDB has public IPs configured.
# That is, for all but the 1st line, get the 1st field.
Expand Down
8 changes: 8 additions & 0 deletions ctdb/config/events.d/11.natgw
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,14 @@ case "$1" in
natgw_clear
;;

monitor)
natgw_check_config

if [ -n "$CTDB_NATGW_PUBLIC_IFACE" ] ; then
interface_monitor "$CTDB_NATGW_PUBLIC_IFACE" || exit 1
fi
;;

*)
ctdb_standard_event_handler "@"
;;
Expand Down

0 comments on commit 638117c

Please sign in to comment.