Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c2f... Commit: c2fa8fe7c8f2a3cbf1023a170f3f78a8de559b7a Parent: 109a4f729592e2f9039ec369df440cbb21a078c7 Author: Lon Hohberger lhh@redhat.com AuthorDate: Wed Sep 8 16:20:19 2010 -0400 Committer: Lon Hohberger lhh@redhat.com CommitterDate: Tue Feb 1 12:32:16 2011 -0500
rgmanager: Do not fail service if non-critical resources fail to stop
During non-critical component recovery (e.g. stop and leave dead), rgmanager stops parts up to the __independent_subtree="2" flag. If any stop operations fail during this phase, rgmanager should ignore them since the resources are non-critical.
During a normal relocation/restart/enable/disable/etc, these operations are critical and a fail to stop will result in the service being placed in to the failed state.
Resolves: rhbz#634277
Signed-off-by: Lon Hohberger lhh@redhat.com --- rgmanager/src/daemons/restree.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c index ab0e20d..8719791 100644 --- a/rgmanager/src/daemons/restree.c +++ b/rgmanager/src/daemons/restree.c @@ -1510,6 +1510,21 @@ _res_op_internal(resource_node_t __attribute__ ((unused)) **tree, node->rn_flags &= ~RF_NEEDSTOP; rv |= res_exec(node, op, NULL, 0);
+ if (node->rn_flags & RF_QUIESCE) { + /* Non-critical resources = do not fail + * service if the resource fails to stop + */ + if (rv & SFL_FAILURE) { + logt_print(LOG_WARNING, "Failure to stop %s:%s" + " during non-critical recovery " + "operation\n", + node->rn_resource->r_rule->rr_type, + primary_attr_value( + node->rn_resource)); + rv &= ~SFL_FAILURE; + } + } + if (rv == 0 && (node->rn_state == RES_STARTED || node->rn_state == RES_FAILED)) { assert(node->rn_resource->r_incarnations >= 0);
cluster-commits@lists.fedorahosted.org