[SCM] Samba Shared Repository - branch master updated

Amitay Isaacs amitay at samba.org
Tue Jul 29 02:04:04 MDT 2014


The branch, master has been updated
       via  7c2c674 ctdb-eventscripts: Remove unused argument to natgw_ensure_master()
       via  d011e70 ctdb-tests: Add another LCP2 takeover test
       via  cb94eba ctdb-eventscripts: Remove NAT gateway "monitor" event
      from  d697c9f messaging4: Simplify imessaging_path

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 7c2c6748e323fb0e54fbc2d1b773608904458e94
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Jul 28 12:56:47 2014 +1000

    ctdb-eventscripts: Remove unused argument to natgw_ensure_master()
    
    This was used to limit damage in the "recovered" event.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Tue Jul 29 10:03:16 CEST 2014 on sn-devel-104

commit d011e70215717a0ec94f6ca30d44b0302e4533ef
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jul 22 12:31:44 2014 +1000

    ctdb-tests: Add another LCP2 takeover test
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit cb94eba157679574c05d85f05828195e4099f2ba
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 25 16:56:57 2014 +1000

    ctdb-eventscripts: Remove NAT gateway "monitor" event
    
    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 at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

-----------------------------------------------------------------------

Summary of changes:
 ctdb/config/events.d/11.natgw           |   10 +----
 ctdb/tests/eventscripts/11.natgw.002.sh |    2 +-
 ctdb/tests/eventscripts/11.natgw.003.sh |    2 +-
 ctdb/tests/eventscripts/11.natgw.004.sh |    2 +-
 ctdb/tests/eventscripts/11.natgw.005.sh |    2 +-
 ctdb/tests/takeover/lcp2.033.sh         |   74 +++++++++++++++++++++++++++++++
 6 files changed, 79 insertions(+), 13 deletions(-)
 create mode 100755 ctdb/tests/takeover/lcp2.033.sh


Changeset truncated at 500 lines:

diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw
index f925d4b..aef302c 100755
--- a/ctdb/config/events.d/11.natgw
+++ b/ctdb/config/events.d/11.natgw
@@ -106,8 +106,6 @@ natgw_set_slave ()
 
 natgw_ensure_master ()
 {
-    _event="$1"
-
     set -- $(ctdb natgwlist)
     natgwmaster="${1:--1}" # Default is -1 if natgwlist fails
     natgwip="$2"
@@ -144,7 +142,7 @@ case "$1" in
 	mypnn=$(ctdb pnn | cut -d: -f2)
 
 	natgw_set_capability
-	natgw_ensure_master "$1"
+	natgw_ensure_master
 
 	natgw_clear
 
@@ -163,12 +161,6 @@ case "$1" in
 	natgw_clear
 	;;
 
-    monitor)
-	natgw_check_config
-	natgw_set_capability
-	natgw_ensure_master "$1"
-	;;
-
     *)
 	ctdb_standard_event_handler "@"
 	;;
diff --git a/ctdb/tests/eventscripts/11.natgw.002.sh b/ctdb/tests/eventscripts/11.natgw.002.sh
index e496e4a..c905406 100755
--- a/ctdb/tests/eventscripts/11.natgw.002.sh
+++ b/ctdb/tests/eventscripts/11.natgw.002.sh
@@ -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
 
diff --git a/ctdb/tests/eventscripts/11.natgw.003.sh b/ctdb/tests/eventscripts/11.natgw.003.sh
index cb2358f..eb821dc 100755
--- a/ctdb/tests/eventscripts/11.natgw.003.sh
+++ b/ctdb/tests/eventscripts/11.natgw.003.sh
@@ -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
diff --git a/ctdb/tests/eventscripts/11.natgw.004.sh b/ctdb/tests/eventscripts/11.natgw.004.sh
index 76f1a54..10bf22c 100755
--- a/ctdb/tests/eventscripts/11.natgw.004.sh
+++ b/ctdb/tests/eventscripts/11.natgw.004.sh
@@ -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
diff --git a/ctdb/tests/eventscripts/11.natgw.005.sh b/ctdb/tests/eventscripts/11.natgw.005.sh
index 94a80c8..074fcda 100755
--- a/ctdb/tests/eventscripts/11.natgw.005.sh
+++ b/ctdb/tests/eventscripts/11.natgw.005.sh
@@ -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
diff --git a/ctdb/tests/takeover/lcp2.033.sh b/ctdb/tests/takeover/lcp2.033.sh
new file mode 100755
index 0000000..a4f6e5f
--- /dev/null
+++ b/ctdb/tests/takeover/lcp2.033.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+. "${TEST_SCRIPTS_DIR}/unit.sh"
+
+define_test "12+4 IPs, 4 nodes, 2 -> 3 -> 4 healthy"
+
+export CTDB_TEST_LOGLEVEL=0
+
+set -e
+
+echo "Nodes 2, 3 disconnected -> node 2 attaches"
+
+required_result <<EOF
+130.216.30.181 2
+130.216.30.180 0
+130.216.30.179 2
+130.216.30.178 1
+130.216.30.177 0
+130.216.30.176 1
+130.216.30.175 0
+130.216.30.174 2
+130.216.30.173 1
+130.216.30.172 2
+130.216.30.171 1
+130.216.30.170 0
+10.19.99.253 2
+10.19.99.252 0
+10.19.99.251 1
+10.19.99.250 0
+EOF
+
+simple_test 0,0,0,1 <<EOF
+10.19.99.253 1
+10.19.99.252 0
+10.19.99.251 1
+10.19.99.250 0
+130.216.30.181 1
+130.216.30.180 0
+130.216.30.179 0
+130.216.30.178 1
+130.216.30.177 0
+130.216.30.176 1
+130.216.30.175 0
+130.216.30.174 1
+130.216.30.173 1
+130.216.30.172 0
+130.216.30.171 1
+130.216.30.170 0
+EOF
+
+echo "Node 3 attaches"
+
+required_result <<EOF
+130.216.30.181 2
+130.216.30.180 3
+130.216.30.179 3
+130.216.30.178 1
+130.216.30.177 0
+130.216.30.176 1
+130.216.30.175 0
+130.216.30.174 2
+130.216.30.173 3
+130.216.30.172 2
+130.216.30.171 1
+130.216.30.170 0
+10.19.99.253 2
+10.19.99.252 3
+10.19.99.251 1
+10.19.99.250 0
+EOF
+
+simple_test 0,0,0,0 <<EOF
+$_out
+EOF


-- 
Samba Shared Repository


More information about the samba-cvs mailing list