Skip to contentSkip to conversation

cluster/rgmanager/src/daemons restree.c

Cluster-devel [email protected] 1 participant 1 message Feb 22, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: lhh at sourceware.org 2007-02-22 16:37:28

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

Log message:
Make status checks happen at 'start' time (parent-before-child) instead of 'stop' time (parent-after-child).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&r1=1.24&r2=1.25

rgmanager/src/daemons/restree.c +7 -7
@@ -1027,15 +1027,21 @@
 				++node->rn_resource->r_incarnations;
 				node->rn_state = RES_STARTED;
 			}
+		} else if (me && (op == RS_STATUS)) {
+			/* Check status before children*/
+			rv = do_status(node);
+			if (rv != 0)
+				return rv;
 		}
 
+
 		if (node->rn_child) {
 			rv = _res_op_by_level(&node, me?NULL:first, ret, op);
 			if (rv != 0)
 				return rv;
 		}
 
-		/* Stop/status/etc stops after children have stopped */
+		/* Stop should occur after children have stopped */
 		if (me && (op == RS_STOP)) {
 			node->rn_flags &= ~RF_NEEDSTOP;
 			rv = res_exec(node, res_ops[op], NULL, 0);
@@ -1049,12 +1055,6 @@
 				--node->rn_resource->r_incarnations;
 				node->rn_state = RES_STOPPED;
 			}
-
-		} else if (me && (op == RS_STATUS)) {
-
-			rv = do_status(node);
-			if (rv != 0)
-				return rv;
 		}
 
 		/*