From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lon Hohberger Date: Tue, 25 Sep 2007 17:19:58 -0400 Subject: [Cluster-devel] [PATCH] from Simone Gotti - Fix 229650 side case Message-ID: <20070925211958.GD10872@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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;