cluster: STABLE3 - rgmanager: Do not fail service if non-critical resources fail to stop
Lon Hohberger
lon at fedoraproject.org
Fri Sep 24 22:19:44 UTC 2010
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=7097cb971d5aa2d7bee6f2ac5bfd7e2db53c8f2d
Commit: 7097cb971d5aa2d7bee6f2ac5bfd7e2db53c8f2d
Parent: d76d0935b4f130a93bf2b50f95b4a54a9264b4ab
Author: Lon Hohberger <lhh at redhat.com>
AuthorDate: Wed Sep 8 16:20:19 2010 -0400
Committer: Lon Hohberger <lhh at redhat.com>
CommitterDate: Fri Sep 24 18:17:22 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.
Signed-off-by: Lon Hohberger <lhh at 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);
More information about the cluster-commits
mailing list