[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL50
Changes by:	pcaulfield sourceware org	2007-01-16 16:31:08

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

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/daemon/commands.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.55.4.1&r2=1.55.4.2

--- cluster/cman/daemon/commands.c	2006/12/13 14:20:50	1.55.4.1
+++ cluster/cman/daemon/commands.c	2007/01/16 16:31:07	1.55.4.2
@@ -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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]