cluster/cman/daemon commands.c
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.
cman/daemon/commands.c +14 -9
@@ -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 ; }