[Cluster-devel] cluster/cman/daemon commands.c

pcaulfield at sourceware.org pcaulfield at sourceware.org
Tue Oct 10 15:14:53 UTC 2006


CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield at sourceware.org	2006-10-10 15:14:53

Modified files:
	cman/daemon    : commands.c 

Log message:
	Avoid spurious messages. and also fix an odd node count when nodes
	rejoin.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/daemon/commands.c.diff?cvsroot=cluster&r1=1.51&r2=1.52

--- cluster/cman/daemon/commands.c	2006/10/05 07:48:33	1.51
+++ cluster/cman/daemon/commands.c	2006/10/10 15:14:53	1.52
@@ -1682,15 +1682,20 @@
         /* This is the killer. If the join_time of the node matches that already stored AND
 	   the node has been down, then we kill it as this must be a rejoin */
 	if (msg->join_time == node->cman_join_time && node->flags & NODE_FLAGS_BEENDOWN) {
-		if (cluster_is_quorate) {
-			P_MEMB("Killing node %s because it has rejoined the cluster without cman_tool join", node->name);
-			log_printf(LOG_CRIT, "Killing node %s because it has rejoined the cluster without cman_tool join", node->name);
-			send_kill(nodeid, CLUSTER_KILL_REJOIN);
-		}
-		else {
-			P_MEMB("Node %s not joined to cman because it has rejoined an inquorate cluster", node->name);
-			log_printf(LOG_CRIT, "Node %s not joined to cman because it has rejoined an inquorate cluster", node->name);
-			node->state = NODESTATE_AISONLY;
+
+		/* Don't duplicate messages */
+		if (node->state == NODESTATE_AISONLY) {
+			if (cluster_is_quorate) {
+				P_MEMB("Killing node %s because it has rejoined the cluster without cman_tool join", node->name);
+				log_printf(LOG_CRIT, "Killing node %s because it has rejoined the cluster without cman_tool join", node->name);
+				node->state = NODESTATE_AISONLY;
+				send_kill(nodeid, CLUSTER_KILL_REJOIN);
+			}
+			else {
+				P_MEMB("Node %s not joined to cman because it has rejoined an inquorate cluster", node->name);
+				log_printf(LOG_CRIT, "Node %s not joined to cman because it has rejoined an inquorate cluster", node->name);
+				node->state = NODESTATE_AISONLY;
+			}
 		}
 		return;
 	}




More information about the Cluster-devel mailing list