[Cluster-devel] [PATCH] from Simone Gotti - Fix 229650 side case
Lon Hohberger
lhh at redhat.com
Tue Sep 25 21:19:58 UTC 2007
SSIA. See:
https://bugzilla.redhat.com/show_bug.cgi?id=229650
Basically, with the __independent_subtree patch, if a child of an
independent subtree-tagged node fails, the whole service is restarted.
--
Lon Hohberger - Software Engineer - Red Hat, Inc.
-------------- next part --------------
Index: restree.c
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/daemons/restree.c,v
retrieving revision 1.23.2.8.2.3
diff -u -r1.23.2.8.2.3 restree.c
--- restree.c 30 Aug 2007 16:05:14 -0000 1.23.2.8.2.3
+++ restree.c 25 Sep 2007 21:04:14 -0000
@@ -1242,9 +1242,23 @@
}
- if (node->rn_child)
- rv |= _res_op_by_level(&node, me?NULL:first, ret, op);
+ if (node->rn_child) {
+ rv |= _res_op_by_level(&node, me?NULL:first, ret, op);
+ /* If one or more child resources are failed and at least one
+ of them is not an independent subtree then let's check if
+ if we are an independent subtree. If so, mark ourself
+ and all our children as failed and return a flag stating
+ that this section is recoverable apart from siblings in
+ the resource tree. */
+ if (op == RS_STATUS && (rv & SFL_FAILURE) &&
+ (node->rn_flags & RF_INDEPENDENT)) {
+ mark_nodes(node, RES_FAILED,
+ RF_NEEDSTART | RF_NEEDSTOP);
+ rv = SFL_RECOVERABLE;
+ }
+ }
+
/* Stop should occur after children have stopped */
if (me && (op == RS_STOP)) {
node->rn_flags &= ~RF_NEEDSTOP;
More information about the Cluster-devel
mailing list