From 7705efc35551a083873e2fed91ac42d021669df9 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 7 Mar 2014 14:14:16 +1100 Subject: [PATCH] ctdb-eventscripts: Clarify that CTDB_NATGW_DEFAULT_GATEWAY is optional This has been implied since the command to add the route has had errors redirected to /dev/null. If infrastucture (e.g. ADS, DNS) is on the same network as CTDB_NATGW_PUBLIC_IP then no route is necessary. Signed-off-by: Martin Schwenke --- ctdb/config/events.d/11.natgw | 4 +++- ctdb/doc/ctdb.7.xml | 11 ++++++----- ctdb/doc/ctdbd.conf.5.xml | 8 +++++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw index 4d58ed2425a..b97eca5e302 100755 --- a/ctdb/config/events.d/11.natgw +++ b/ctdb/config/events.d/11.natgw @@ -69,7 +69,9 @@ natgw_set_master () -d $ctdb_natgw_public_ip_host -j REJECT 2>/dev/null ip addr add $CTDB_NATGW_PUBLIC_IP dev $CTDB_NATGW_PUBLIC_IFACE - ip route add 0.0.0.0/0 metric 10 via $CTDB_NATGW_DEFAULT_GATEWAY >/dev/null 2>/dev/null + if [ -n "$CTDB_NATGW_DEFAULT_GATEWAY" ] ; then + ip route add 0.0.0.0/0 metric 10 via $CTDB_NATGW_DEFAULT_GATEWAY + fi } natgw_set_slave () diff --git a/ctdb/doc/ctdb.7.xml b/ctdb/doc/ctdb.7.xml index 989a28070c3..d6403000246 100644 --- a/ctdb/doc/ctdb.7.xml +++ b/ctdb/doc/ctdb.7.xml @@ -635,11 +635,12 @@ CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1 CTDB_NATGW_PUBLIC_IP on the configured public interfaces CTDB_NATGW_PUBLIC_IFACE and acts as a router, masquerading outgoing connections from slave nodes - via this IP address. It also establishes a fallback default - route to the configured default gateway - CTDB_NATGW_DEFAULT_GATEWAY with a metric of 10. - A metric 10 route is used so it can co-exist with other - default routes that may be available. + via this IP address. If + CTDB_NATGW_DEFAULT_GATEWAY is set then it + also establishes a fallback default route to the configured + this gateway with a metric of 10. A metric 10 route is used + so it can co-exist with other default routes that may be + available. diff --git a/ctdb/doc/ctdbd.conf.5.xml b/ctdb/doc/ctdbd.conf.5.xml index d80bda6960f..6d164f6cfcd 100644 --- a/ctdb/doc/ctdbd.conf.5.xml +++ b/ctdb/doc/ctdbd.conf.5.xml @@ -458,11 +458,13 @@ IPADDR is an alternate network gateway to use on the NAT - gateway master node. A fallback default route is added - via this network gateway. + gateway master node. If set, a fallback default route + is added via this network gateway. - No default. + No default. Setting this variable is optional - if not + set that no route is created on the NAT gateway master + node. -- 2.11.4.GIT