Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=399... Commit: 39919bc11779ca18490548199e977c8a93c627be Parent: 06993e7d6253dbb9a0e83c8edeba4d7a99f61954 Author: Lon Hohberger lhh@redhat.com AuthorDate: Wed Sep 8 16:20:19 2010 -0400 Committer: Lon Hohberger lhh@redhat.com CommitterDate: Fri Sep 24 16:16:03 2010 -0400
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#605733
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 ea458d6..0494cdc 100644 --- a/rgmanager/src/daemons/restree.c +++ b/rgmanager/src/daemons/restree.c @@ -1550,6 +1550,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) { + clulog(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