cluster: RHEL56 - rgmanager: Add non-critical base behavior
Lon Hohberger
lon at fedoraproject.org
Fri Sep 24 22:20:45 UTC 2010
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0c39fc38a75ab456945b1ac2c73b1fd35dc0cf9f
Commit: 0c39fc38a75ab456945b1ac2c73b1fd35dc0cf9f
Parent: 977a199f73e70d8527a335841a5188bcaaa99477
Author: Lon Hohberger <lhh at redhat.com>
AuthorDate: Wed Aug 25 13:17:24 2010 -0400
Committer: Lon Hohberger <lhh at redhat.com>
CommitterDate: Fri Sep 24 16:16:02 2010 -0400
rgmanager: Add non-critical base behavior
Resolves: rhbz#605733
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 2462af2..1bb9d9a 100644
--- a/rgmanager/src/daemons/restree.c
+++ b/rgmanager/src/daemons/restree.c
@@ -703,6 +703,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);
@@ -1491,8 +1498,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