[SCM] CTDB repository - branch 2.5 updated - ctdb-2.5.3-101-g8086fda

Amitay Isaacs amitay at samba.org
Tue Jul 29 19:53:06 MDT 2014


The branch, 2.5 has been updated
       via  8086fda6426f5f8590c18439f16ad4265692b68d (commit)
       via  a6e82e6fe926fc246d7d22cbc68534d614bd64ff (commit)
       via  8afe2d963d0728390ead545764028b5c3c83a6f2 (commit)
      from  922ab4c0991f80dd4c5f569ee69896b23b21a9e1 (commit)

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


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

    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
    
    (Imported from commit 7c2c6748e323fb0e54fbc2d1b773608904458e94)

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

    tests: Add another LCP2 takeover test
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    (Imported from commit d011e70215717a0ec94f6ca30d44b0302e4533ef)

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

    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>
    
    (Imported from commit cb94eba157679574c05d85f05828195e4099f2ba)

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

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


Changeset truncated at 500 lines:

diff --git a/config/events.d/11.natgw b/config/events.d/11.natgw
index f925d4b..aef302c 100755
--- a/config/events.d/11.natgw
+++ b/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/tests/eventscripts/11.natgw.002.sh b/tests/eventscripts/11.natgw.002.sh
index e496e4a..c905406 100755
--- a/tests/eventscripts/11.natgw.002.sh
+++ b/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/tests/eventscripts/11.natgw.003.sh b/tests/eventscripts/11.natgw.003.sh
index cb2358f..eb821dc 100755
--- a/tests/eventscripts/11.natgw.003.sh
+++ b/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/tests/eventscripts/11.natgw.004.sh b/tests/eventscripts/11.natgw.004.sh
index 76f1a54..10bf22c 100755
--- a/tests/eventscripts/11.natgw.004.sh
+++ b/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/tests/eventscripts/11.natgw.005.sh b/tests/eventscripts/11.natgw.005.sh
index 94a80c8..074fcda 100755
--- a/tests/eventscripts/11.natgw.005.sh
+++ b/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/tests/takeover/lcp2.033.sh b/tests/takeover/lcp2.033.sh
new file mode 100755
index 0000000..a4f6e5f
--- /dev/null
+++ b/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


-- 
CTDB repository


More information about the samba-cvs mailing list