ctdb-eventscripts: Remove NAT gateway "monitor" event
authorMartin Schwenke <martin@meltin.net>
Fri, 25 Jul 2014 06:56:57 +0000 (16:56 +1000)
committerAmitay Isaacs <amitay@samba.org>
Tue, 29 Jul 2014 05:38:13 +0000 (07:38 +0200)
This event was introduced to handle misconfiguration.  For example,
where all nodes where configured as NAT gateway slaves.

However, this event can fail when there are performance issues and
capabilities can't be retrieved from a remote node.  The problem is
most likely with the remote node, so marking the local node UNHEALTHY
is probably a mistake.

Having a NAT gateway master node only matters in "ipreallocated", so
leave it to do the checking.  Given that a node will run
"ipreallocated" as part of the first recovery, this should cause
misconfigurations to be detected nice and early.

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.002.sh
ctdb/tests/eventscripts/11.natgw.003.sh
ctdb/tests/eventscripts/11.natgw.004.sh
ctdb/tests/eventscripts/11.natgw.005.sh

index f925d4b735724ef55bdb87532a75a6f47d48fce5..a541d31957df8a31cf2e95c4e442ee407a68652a 100755 (executable)
@@ -163,12 +163,6 @@ case "$1" in
        natgw_clear
        ;;
 
-    monitor)
-       natgw_check_config
-       natgw_set_capability
-       natgw_ensure_master "$1"
-       ;;
-
     *)
        ctdb_standard_event_handler "@"
        ;;
index e496e4a3c4ace19d295b3eb694ec3dd27421c73e..c9054068df417db6831276648737714766593a1f 100755 (executable)
@@ -18,7 +18,7 @@ required_result 1 <<EOF
 error: CTDB_NATGW_NODES=${CTDB_NATGW_NODES} unreadable
 EOF
 
-for i in "startup" "ipreallocated" "monitor" ; do
+for i in "startup" "ipreallocated" ; do
     simple_test_event "$i"
 done
 
index cb2358fe2ec127ce401e64fcb0a4da029bd381b6..eb821dca48bd07e6f5a230de6edf2756df216cd9 100755 (executable)
@@ -16,6 +16,6 @@ CTDB_NATGW_PUBLIC_IFACE=""
 
 required_result 1 "Invalid configuration: CTDB_NATGW_PUBLIC_IFACE not set"
 
-for i in "startup" "ipreallocated" "monitor" ; do
+for i in "startup" "ipreallocated" ; do
     simple_test_event "$i"
 done
index 76f1a54e258d7b437710c1f984425dd13ca73726..10bf22c711ac564d04cdf461ff8fbb4f94bafc61 100755 (executable)
@@ -16,6 +16,6 @@ CTDB_NATGW_PUBLIC_IP=""
 
 required_result 1 "Invalid configuration: CTDB_NATGW_PUBLIC_IP not set"
 
-for i in "startup" "ipreallocated" "monitor" ; do
+for i in "startup" "ipreallocated" ; do
     simple_test_event "$i"
 done
index 94a80c88825745a0cc4a59ca320c9ec56cc166dc..074fcdaa1c564286a29fed9e51064ede53c67269 100755 (executable)
@@ -19,6 +19,6 @@ Inconsistent test configuration - master node is slave-only
 There is no NATGW master node
 EOF
 
-for i in "ipreallocated" "monitor" ; do
+for i in "ipreallocated" ; do
     simple_test_event "$i"
 done