From 39919bc11779ca18490548199e977c8a93c627be Mon Sep 17 00:00:00 2001 From: Lon Hohberger <lhh@redhat.com> Date: Wed, 8 Sep 2010 16:20:19 -0400 Subject: [PATCH] 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); -- 1.7.2.2