cluster: RHEL6 - rgmanager: Add non-critical base behavior
Lon Hohberger
lon at fedoraproject.org
Tue Feb 1 18:10:26 UTC 2011
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=ca924c428bbf149531f896b52c9ba6f1597c634b
Commit: ca924c428bbf149531f896b52c9ba6f1597c634b
Parent: 16ab187d7733c653dddc3e1b9cd90524ccdf8947
Author: Lon Hohberger <lhh at redhat.com>
AuthorDate: Wed Aug 25 13:17:24 2010 -0400
Committer: Lon Hohberger <lhh at redhat.com>
CommitterDate: Tue Feb 1 12:29:29 2011 -0500
rgmanager: Add non-critical base behavior
Resolves: rhbz#634277
Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
rgmanager/src/daemons/restree.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c
index 5f37716..e480cc8 100644
--- a/rgmanager/src/daemons/restree.c
+++ b/rgmanager/src/daemons/restree.c
@@ -663,6 +663,13 @@ do_load_resource(int ccsfd, char *base,
curres->r_flags &= ~RF_NON_CRITICAL;
}
+ if (curres->r_flags & RF_NON_CRITICAL) {
+ /* Independent subtree is implied if a
+ * resource is non-critical
+ */
+ node->rn_flags |= RF_NON_CRITICAL | RF_INDEPENDENT;
+ }
+
*newnode = node;
list_insert(tree, node);
@@ -1451,8 +1458,13 @@ _res_op_internal(resource_node_t __attribute__ ((unused)) **tree,
the resource tree. */
if (op == RS_STATUS && (rv & SFL_FAILURE) &&
(node->rn_flags & RF_INDEPENDENT)) {
- mark_nodes(node, RES_FAILED,
- RF_NEEDSTART | RF_NEEDSTOP, 0);
+ if (node->rn_flags & RF_NON_CRITICAL)
+ /* if non-critical, just stop */
+ mark_nodes(node, RES_FAILED,
+ RF_NEEDSTOP, 0);
+ else
+ mark_nodes(node, RES_FAILED,
+ RF_NEEDSTOP | RF_NEEDSTART, 0);
rv = SFL_RECOVERABLE;
}
}
More information about the cluster-commits
mailing list