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

[Cluster-devel] cluster/rgmanager ChangeLog src/daemons/restre ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh sourceware org	2007-08-30 16:09:39

Modified files:
	rgmanager      : ChangeLog 
	rgmanager/src/daemons: restree.c rg_state.c 

Log message:
	Fix #229650, pass 3

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&r1=1.58&r2=1.59
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&r1=1.36&r2=1.37
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_state.c.diff?cvsroot=cluster&r1=1.39&r2=1.40

--- cluster/rgmanager/ChangeLog	2007/08/22 14:02:28	1.58
+++ cluster/rgmanager/ChangeLog	2007/08/30 16:09:38	1.59
@@ -1,3 +1,7 @@
+2007-08-30 Lon Hohberger <lhh at redhat.com>
+	* src/daemons/restree.c, rg_state.c: Fix tree-restart bug
+	This is another part of #229650
+
 2007-08-22 Fabio M. Di Nitto <fabbione at ubuntu.com>
 	* include/list.h: Fix build with gcc-4.2.
 
--- cluster/rgmanager/src/daemons/restree.c	2007/08/02 14:53:38	1.36
+++ cluster/rgmanager/src/daemons/restree.c	2007/08/30 16:09:39	1.37
@@ -959,20 +959,17 @@
 		return _res_op(&node->rn_child, first, NULL, ret, op);
 
 	if (op == RS_START || op == RS_STATUS) {
-		rv =  _do_child_levels(tree, first, ret, op);
+		rv |= _do_child_levels(tree, first, ret, op);
 	       	if (rv & SFL_FAILURE)
 			return rv;
 
 		/* Start default level after specified ones */
-		rv =  _do_child_default_level(tree, first, ret, op);
+		rv |= _do_child_default_level(tree, first, ret, op);
 
 	} /* stop */ else {
 
-		rv =  _do_child_default_level(tree, first, ret, op);
-	       	if (rv != 0)
-			return rv;
-
-		rv =  _do_child_levels(tree, first, ret, op);
+		rv |= _do_child_default_level(tree, first, ret, op);
+		rv |= _do_child_levels(tree, first, ret, op);
 	}
 
 	return rv;
@@ -1269,22 +1266,8 @@
 
 	}
 
-	if (node->rn_child) {
-		rv = _res_op_by_level(&node, me?NULL:first, ret, op);
-		if (rv != 0) {
-			mark_nodes(node, RES_FAILED,
-				   RF_NEEDSTART | RF_NEEDSTOP);
-
-			/* If this node is independent of its siblings,
-			   that one of its dependent children failed
-			   does not matter: its dependent children must
-			   also be independent of this node's siblings. */
-			if (node->rn_flags & RF_INDEPENDENT)
-				return SFL_RECOVERABLE;
-
-			return SFL_FAILURE;
-		}
-	}
+	if (node->rn_child)
+		rv |= _res_op_by_level(&node, me?NULL:first, ret, op);
 
 	/* Stop should occur after children have stopped */
 	if (me && (op == RS_STOP)) {
--- cluster/rgmanager/src/daemons/rg_state.c	2007/08/02 14:53:38	1.39
+++ cluster/rgmanager/src/daemons/rg_state.c	2007/08/30 16:09:39	1.40
@@ -1151,10 +1151,13 @@
 static inline int
 handle_started_status(char *svcName, int ret, rg_state_t *svcStatus)
 {
+	int newowner;
+
 	if (ret & SFL_FAILURE) {
-		ret = msvc_check_cluster(svcName);
-		if (ret >= 0)
-			return 1;
+		newowner = msvc_check_cluster(svcName);
+		if (newowner >= 0)
+			return 0; /* running but not here */
+		return ret;	  /* not running anymore */
 	}
 
 	/* Ok, we have a recoverable service.  Try to perform


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