ctdb-scripts: No longer set the NAT gateway capability
authorMartin Schwenke <martin@meltin.net>
Tue, 5 Jan 2016 04:53:50 +0000 (15:53 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 25 Jan 2016 06:18:25 +0000 (07:18 +0100)
Nothing checks it anymore.

This means that the NAT gateway capability in the daemon is now
unused.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/events.d/11.natgw
ctdb/tests/eventscripts/11.natgw.053.sh
ctdb/tests/eventscripts/11.natgw.054.sh

index 32e42c9e2b797177f3905d4ddd725ec4e35d8060..2b30eebb88ff459cb0b6b5308ad03003bfb9b188 100755 (executable)
@@ -98,16 +98,6 @@ natgw_config_has_changed ()
     return 0
 }
 
-natgw_set_capability ()
-{
-    # Set NATGW capability depending on configuration
-    if ctdb_natgw_slave_only ; then
-       ctdb setnatgwstate off
-    else
-       ctdb setnatgwstate on
-    fi
-}
-
 _natgw_clear ()
 {
     _ip="${CTDB_NATGW_PUBLIC_IP%/*}"
@@ -210,10 +200,9 @@ natgw_save_state ()
 }
 
 
-case "$1" in 
+case "$1" in
     setup)
        natgw_check_config
-       natgw_set_capability
        ;;
 
     startup)
@@ -235,7 +224,6 @@ case "$1" in
 
        ctdb_get_pnn
 
-       natgw_set_capability
        natgw_ensure_master
 
        natgw_config_has_changed || natgw_master_has_changed || exit 0
index 00b72ed412ee9f39a42174889eccf0588c1da67e..7c51ec11e8a0bdb1c47bb21931f1386d13a35ef9 100755 (executable)
@@ -12,7 +12,5 @@ setup_ctdb_natgw <<EOF
 192.168.1.24
 EOF
 
-ctdb setnatgwstate on
-
 ok_null
 simple_test_event "monitor"
index 25a1c92d27accde903b64d06748107d30a191869..08b4b775593d0eae5b213371c20cbebec7516312 100755 (executable)
@@ -12,8 +12,6 @@ setup_ctdb_natgw <<EOF
 192.168.1.24
 EOF
 
-ctdb setnatgwstate on
-
 ethtool_interfaces_down "$CTDB_NATGW_PUBLIC_IFACE"
 
 required_result 1 <<EOF