[SCM] CTDB repository - branch master updated - ctdb-1.0.103-10-g5e13a25

Ronnie Sahlberg sahlberg at samba.org
Thu Nov 5 22:37:18 MST 2009


The branch, master has been updated
       via  5e13a25df5ccf184bd48595c99765a592bbc5969 (commit)
       via  8001ae580bcc28d45f6026b529d7ffc247cbba34 (commit)
       via  e8e7129ff1371065fbd75e1aea844d6d04a96fa9 (commit)
      from  eda052101728cf922ce892e3c53b4f37e7ceac42 (commit)

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


- Log -----------------------------------------------------------------
commit 5e13a25df5ccf184bd48595c99765a592bbc5969
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Nov 6 11:16:05 2009 +1100

    version 1.0.104

commit 8001ae580bcc28d45f6026b529d7ffc247cbba34
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Nov 6 09:54:03 2009 +1100

    sugegstion from metze,
    use killtcp and kill both directions of the nfs connections.
    we used to kill only one direction since the other direction was unkillble
    but recent kernels allow us to kill both

commit e8e7129ff1371065fbd75e1aea844d6d04a96fa9
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Nov 6 08:19:32 2009 +1100

    suggestion from Christian,
    
    dont allow UNHEALTHY nodes to become natgw master, unless all nodes
    are unhealthy

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

Summary of changes:
 config/functions           |    4 ++--
 packaging/RPM/ctdb.spec.in |   20 +++++++++++++++++++-
 tools/ctdb.c               |   15 ++++++++++++---
 3 files changed, 33 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/functions b/config/functions
index 1d1d054..043051b 100644
--- a/config/functions
+++ b/config/functions
@@ -318,8 +318,8 @@ kill_tcp_connections() {
 	echo "Killing TCP connection $srcip:$srcport $destip:$destport"
 	ctdb killtcp $srcip:$srcport $destip:$destport >/dev/null 2>&1 || _failed=1
 	case $destport in
-	  # we only do one-way killtcp for NFS and CIFS
-	  139|445|2049) : ;;
+	  # we only do one-way killtcp for CIFS
+	  139|445) : ;;
 	  # for all others we do 2-way
 	  *) 
 	  	ctdb killtcp $destip:$destport $srcip:$srcport >/dev/null 2>&1 || _failed=1
diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index 2052ae4..24ded62 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -4,7 +4,7 @@ Summary: Clustered TDB
 Vendor: Samba Team
 Packager: Samba Team <samba at samba.org>
 Name: ctdb
-Version: 1.0.103
+Version: 1.0.104
 Release: 1GITHASH
 Epoch: 0
 License: GNU GPL version 3
@@ -118,6 +118,24 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/ctdb.pc
 
 %changelog
+* Fri Nov 6 2009 : Version 1.0.104
+ - Suggestion from Metze, we can now use killtcp to kill local connections
+   for nfs so change the killtcp script to kill both directions of an NFS
+   connection.
+   We used to deliberately only kill one direction in these cases due to
+   limitations.
+ - Suggestion from christian Ambach, when using natgw, try to avoid using a
+   UNHEALTHY node as the natgw master.
+ - From Michael Adam: Fix a SEGV bug in the recent change to the eventscripts
+   to allow the timeout to apply to each individual script.
+ - fix a talloc bug in teh vacuuming code that produced nasty valgrind
+   warnings.
+ - From Rusty: Set up ulimit to create core files for ctdb, and spawned
+   processes by default. This is useful for debugging and testing but can be
+   disabled by setting CTDB_SUPRESS_COREFILE=yes in the sysconfig file.
+ - Remove the wbinfo -t check from the startup check that winbindd is happy.
+ - Enhance the test for bond devices so we also check if the sysadmin have
+   disabled all slave devices using "ifdown".
 * Tue Nov 3 2009 : Version 1.0.103
  - Dont use vacuuming on persistent databases
  - Michael A : transaction updates to persistent databases
diff --git a/tools/ctdb.c b/tools/ctdb.c
index c1fe88c..838efdb 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -676,15 +676,24 @@ static int control_natgwlist(struct ctdb_context *ctdb, int argc, const char **a
 		i++;
 	}		
 
-	/* print the natgw master
-	 * we dont allow STOPPED or DELETED nodes to become the natgwmaster
+	/* pick a node to be natgwmaster
+	 * we dont allow STOPPED, DELETED, BANNED or UNHEALTHY nodes to become the natgwmaster
 	 */
 	for(i=0;i<nodemap->num;i++){
-		if (!(nodemap->nodes[i].flags & (NODE_FLAGS_DISCONNECTED|NODE_FLAGS_STOPPED|NODE_FLAGS_DELETED))) {
+		if (!(nodemap->nodes[i].flags & (NODE_FLAGS_DISCONNECTED|NODE_FLAGS_STOPPED|NODE_FLAGS_DELETED|NODE_FLAGS_BANNED|NODE_FLAGS_UNHEALTHY))) {
 			printf("%d %s\n", nodemap->nodes[i].pnn,ctdb_addr_to_str(&nodemap->nodes[i].addr));
 			break;
 		}
 	}
+	/* we couldnt find any healthy node, try unhealthy ones */
+	if (i == nodemap->num) {
+		for(i=0;i<nodemap->num;i++){
+			if (!(nodemap->nodes[i].flags & (NODE_FLAGS_DISCONNECTED|NODE_FLAGS_STOPPED|NODE_FLAGS_DELETED))) {
+				printf("%d %s\n", nodemap->nodes[i].pnn,ctdb_addr_to_str(&nodemap->nodes[i].addr));
+				break;
+			}
+		}
+	}
 	/* unless all nodes are STOPPED, when we pick one anyway */
 	if (i == nodemap->num) {
 		for(i=0;i<nodemap->num;i++){


-- 
CTDB repository


More information about the samba-cvs mailing list