From mboxrd@z Thu Jan 1 00:00:00 1970 From: pcaulfield@sourceware.org Date: 10 Oct 2006 15:14:53 -0000 Subject: [Cluster-devel] cluster/cman/daemon commands.c Message-ID: <20061010151453.30350.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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; }