cluster/cman/daemon commands.c
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: pcaulfield at sourceware.org 2007-01-16 09:57:21
Modified files:
cman/daemon : commands.c
Log message:
Don't return to 'cman_tool leave' until we are just about to quit. Otherwise there can be a delay between cman_tool thinking that we are down, and the node really being out of the cluster. see bz#222686
cman/daemon/commands.c +9 -5
@@ -869,13 +869,13 @@ }else { reply = -EBUSY ; + +/* Tell originator that shutdown was cancelled */ +send_status_return (shutdown_con,CMAN_CMD_TRY_SHUTDOWN , reply); + shutdown_con =NULL ; }P_MEMB ("shutdown decision is: %d (yes=%d, no=%d) flags=%x\n" , reply, shutdown_yes, shutdown_no, shutdown_flags); - -/* Tell originator what we decided */ -send_status_return (shutdown_con,CMAN_CMD_TRY_SHUTDOWN , reply); - shutdown_con =NULL ; } }
@@ -1827,8 +1827,12 @@P_MEMB ("got LEAVE from node %d, reason = %d\n" , nodeid, leavemsg->reason);/* We got our own leave message back. now quit */ -if (node && node->node_id == us->node_id) +if (node && node->node_id == us->node_id) { +/* Tell whomever asked us to leave that we are now going down */ +if (shutdown_con) +send_status_return (shutdown_con,CMAN_CMD_TRY_SHUTDOWN ,0 );exit (0 ); + }/* Someone else, make a note of the reason for leaving */ if (node)