cluster: STABLE3 - rgmanager: Add non-critical base behavior

Lon Hohberger lon at fedoraproject.org
Fri Sep 24 22:19:23 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=4d7ec682cb842d00f29af3ca3b82a6488c6a7bb3
Commit:        4d7ec682cb842d00f29af3ca3b82a6488c6a7bb3
Parent:        1435ea61cd9e2f02be0a081bec2ccc3cf03b064b
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 18:17:21 2010 -0400

rgmanager: Add non-critical base behavior

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