Rev 483: ensure all nodes display disabled nodes correctly in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Wed Jun 6 11:27:09 GMT 2007


------------------------------------------------------------
revno: 483
revision-id: tridge at samba.org-20070606112709-klp56ghkr55r3m4d
parent: tridge at samba.org-20070606094625-rr6b22zkbeskchvj
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Wed 2007-06-06 21:27:09 +1000
message:
  ensure all nodes display disabled nodes correctly
modified:
  common/ctdb_monitor.c          ctdb_monitor.c-20070518100625-8jf4ft1mjzmb22ck-1
  common/ctdb_recoverd.c         recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
=== modified file 'common/ctdb_monitor.c'
--- a/common/ctdb_monitor.c	2007-06-06 03:45:12 +0000
+++ b/common/ctdb_monitor.c	2007-06-06 11:27:09 +0000
@@ -121,8 +121,9 @@
 	data.dptr = (uint8_t *)&c;
 	data.dsize = sizeof(c);
 
-	/* tell the recmaster that something has changed */
-	ctdb_daemon_send_message(ctdb, ctdb->recovery_master, CTDB_SRVID_NODE_FLAGS_CHANGED, data);
+	/* tell the other nodes that something has changed */
+	ctdb_daemon_send_message(ctdb, CTDB_BROADCAST_VNNMAP,
+				 CTDB_SRVID_NODE_FLAGS_CHANGED, data);
 }
 
 

=== modified file 'common/ctdb_recoverd.c'
--- a/common/ctdb_recoverd.c	2007-06-06 01:13:24 +0000
+++ b/common/ctdb_recoverd.c	2007-06-06 11:27:09 +0000
@@ -991,11 +991,15 @@
 		return;
 	}
 
-	DEBUG(0,("Node %u has changed flags - now 0x%x\n", c->vnn, c->flags));
+	if (c->vnn != ctdb->vnn) {
+		DEBUG(0,("Node %u has changed flags - now 0x%x\n", c->vnn, c->flags));
+	}
 
 	nodemap->nodes[i].flags = c->flags;
 	
-	if (ctdb->takeover.enabled) {
+	if (ctdb->recovery_master == ctdb->vnn &&
+	    ctdb->recovery_mode == CTDB_RECOVERY_NORMAL &&
+	    ctdb->takeover.enabled) {
 		ret = ctdb_takeover_run(ctdb, nodemap);
 		if (ret != 0) {
 			DEBUG(0, (__location__ " Unable to setup public takeover addresses\n"));



More information about the samba-cvs mailing list