[Cluster-devel] cluster/rgmanager include/list.h include/resli ...

lhh at sourceware.org lhh at sourceware.org
Tue Mar 20 19:44:35 UTC 2007


CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	STABLE
Changes by:	lhh at sourceware.org	2007-03-20 19:44:25

Modified files:
	rgmanager/include: list.h reslist.h 
	rgmanager/src/clulib: clulog.c 
	rgmanager/src/daemons: fo_domain.c reslist.c resrules.c 
	                       restree.c test.c 
	rgmanager/src/daemons/tests: delta-test002-test003.expected 
	                             delta-test003-test004.expected 
	                             delta-test004-test005.expected 
	                             delta-test005-test006.expected 
	                             delta-test006-test007.expected 
	                             delta-test007-test008.expected 
	                             delta-test008-test009.expected 
	                             delta-test009-test010.expected 
	                             delta-test010-test011.expected 
	                             delta-test011-test012.expected 
	                             delta-test012-test013.expected 
	                             delta-test013-test014.expected 
	                             delta-test014-test015.expected 
	                             delta-test015-test016.expected 
	                             test003.expected test004.expected 
	                             test005.expected test006.expected 
	                             test007.expected test008.expected 
	                             test009.expected test010.expected 
	                             test011.expected test012.expected 
	                             test013.expected test014.expected 
	                             test015.expected test016.expected 
	rgmanager/src/resources: lvm.sh ocf-shellfuncs 

Log message:
	Merge from RHEL4 branch

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/include/list.h.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.2.1.6.1&r2=1.2.2.1.6.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/include/reslist.h.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.8.2.3.6.2&r2=1.8.2.3.6.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/clulog.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.2.1.6.5&r2=1.2.2.1.6.6
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/fo_domain.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.5.2.2.6.1&r2=1.5.2.2.6.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/reslist.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.6.2.4.6.5&r2=1.6.2.4.6.6
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/resrules.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.9.2.2.6.3&r2=1.9.2.2.6.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.10.2.2.6.9&r2=1.10.2.2.6.10
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/test.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.3&r2=1.1.2.3.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test002-test003.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test003-test004.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test004-test005.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test005-test006.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test006-test007.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test007-test008.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test008-test009.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test009-test010.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test010-test011.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test011-test012.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test012-test013.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test013-test014.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test014-test015.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/delta-test015-test016.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test003.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test004.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test005.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test006.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test007.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test008.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test009.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test010.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test011.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test012.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test013.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test014.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test015.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test016.expected.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2&r2=1.1.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/lvm.sh.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.4.1&r2=1.1.4.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/ocf-shellfuncs.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.2.6&r2=1.2.2.7

--- cluster/rgmanager/include/list.h	2006/06/16 20:07:46	1.2.2.1.6.1
+++ cluster/rgmanager/include/list.h	2007/03/20 19:44:24	1.2.2.1.6.2
@@ -29,6 +29,14 @@
 	} \
 } while (0)
 
+	
+#define list_prepend(list, newnode) \
+do { \
+	list_insert(list, newnode); \
+	*list = newnode; \
+} while (0)
+
+
 #define list_remove(list, oldnode) \
 do { \
 	if (le(oldnode) == le(*list)) { \
@@ -46,6 +54,11 @@
 	} \
 } while (0)
 
+/*
+   list_do(list, node) {
+   	stuff;
+   } while (!list_done(list, node));
+ */
 #define list_do(list, curr) \
 	if (*list && (curr = *list)) do
 
@@ -53,9 +66,29 @@
 	(curr && (((curr = (void *)le(curr)->le_next)) && (curr == *list)))
 
 /*
-   list_do(list, node) {
-   	stuff;
-   } while (!list_done(list, node));
+ * list_for(list, tmp, counter) {
+ *     stuff;
+ * }
+ * 
+ * counter = # of items in list when done.
+ * * sets cnt to 0 before even checking list;
+ * * checks for valid list
+ * * traverses list, incrementing counter.  If we get to the for loop,
+ *   there must be at least one item in the list
  */
+#define list_for(list, curr, cnt) \
+	if (!(cnt=0) && list && *list) \
+		for (curr = *list; \
+		     (cnt == 0) || (curr != *list); \
+		     curr = (void*)le(curr)->le_next, \
+		     cnt++)
+			
+#define list_for_rev(list, curr, cnt) \
+	if (!(cnt=0) && list && *list) \
+		for (curr = (void *)(le(*list)->le_prev); \
+		     (cnt == 0) || ((void *)curr != le(*list)->le_prev); \
+		     curr = (void*)(le(curr)->le_prev), \
+		     cnt++)
+				   
 
 #endif
--- cluster/rgmanager/include/reslist.h	2005/12/06 18:31:40	1.8.2.3.6.2
+++ cluster/rgmanager/include/reslist.h	2007/03/20 19:44:24	1.8.2.3.6.3
@@ -79,9 +79,10 @@
 
 
 typedef struct _resource_child {
-	char    rc_forbid;
 	int	rc_startlevel;
 	int	rc_stoplevel;
+	int	rc_forbid;
+	int	rc_flags;
 	char	*rc_name;
 } resource_child_t;
 
--- cluster/rgmanager/src/clulib/clulog.c	2007/01/26 20:47:16	1.2.2.1.6.5
+++ cluster/rgmanager/src/clulib/clulog.c	2007/03/20 19:44:24	1.2.2.1.6.6
@@ -20,7 +20,7 @@
 /** @file
  * Library routines for communicating with the logging daemon.
  *
- *  $Id: clulog.c,v 1.2.2.1.6.5 2007/01/26 20:47:16 lhh Exp $
+ *  $Id: clulog.c,v 1.2.2.1.6.6 2007/03/20 19:44:24 lhh Exp $
  *
  *  Author: Jeff Moyer <moyer at missioncriticallinux.com>
  */
@@ -50,7 +50,7 @@
 #include <string.h>
 
 
-static const char *version __attribute__ ((unused)) = "$Revision: 1.2.2.1.6.5 $";
+static const char *version __attribute__ ((unused)) = "$Revision: 1.2.2.1.6.6 $";
 
 #ifdef DEBUG
 #include <assert.h>
--- cluster/rgmanager/src/daemons/fo_domain.c	2006/06/16 20:07:46	1.5.2.2.6.1
+++ cluster/rgmanager/src/daemons/fo_domain.c	2007/03/20 19:44:25	1.5.2.2.6.2
@@ -366,12 +366,14 @@
 	}
 #endif
 
+	if (!strlen(domainname))
+		RETURN(FOD_BEST);
+
 	/*
 	 * Ok, we've got a failover domain associated with the service.
 	 * Let's see if the domain actually exists...
 	 */
 	list_do(domains, fod) {
-
 		if (!strcasecmp(fod->fd_name, domainname)) {
 			found = 1;
 			break;
--- cluster/rgmanager/src/daemons/reslist.c	2007/01/26 21:06:01	1.6.2.4.6.5
+++ cluster/rgmanager/src/daemons/reslist.c	2007/03/20 19:44:25	1.6.2.4.6.6
@@ -391,17 +391,52 @@
 {
 	char *val = NULL, *ret = NULL;
 	xmlXPathObjectPtr obj;
+	xmlNodePtr node;
+	size_t size = 0;
+	int nnv = 0;
 
 	obj = xmlXPathEvalExpression((unsigned char *)query, ctx);
 	if (!obj)
 		return NULL;
+	if (!obj->nodesetval)
+		goto out;
+	if (obj->nodesetval->nodeNr <= 0)
+		goto out;
+
+	node = obj->nodesetval->nodeTab[0];
+	if(!node)
+		goto out;
+
+	if (((node->type == XML_ATTRIBUTE_NODE) && strstr(query, "@*")) ||
+	    ((node->type == XML_ELEMENT_NODE) && strstr(query, "child::*"))){
+		if (node->children && node->children->content)
+	  		size = strlen(node->children->content)+
+				      strlen(node->name)+2;
+		else 
+			size = strlen(node->name)+2;
+		nnv = 1;
+	} else {
+		if (node->children && node->children->content) {
+			size = strlen(node->children->content)+1;
+		} else {
+			goto out;
+		}
+	}
 
-	if (obj->nodesetval && obj->nodesetval->nodeNr >= 1) {
-		val = (char *)obj->nodesetval->nodeTab[0]->children->content;
-		if (strlen(val) >= 1)
-			ret = strdup(val);
+	val = (char *)malloc(size);
+	if(!val)
+		goto out;
+	memset(val, 0, size);
+	if (nnv) {
+		sprintf(val, "%s=%s", node->name, node->children ?
+			(char *)node->children->content:"");
+	} else {
+		sprintf(val, "%s", node->children ? node->children->content :
+			node->name);
 	}
 
+	ret = val;
+out:
 	xmlXPathFreeObject(obj);
 
 	return ret;
--- cluster/rgmanager/src/daemons/resrules.c	2007/01/26 20:47:16	1.9.2.2.6.3
+++ cluster/rgmanager/src/daemons/resrules.c	2007/03/20 19:44:25	1.9.2.2.6.4
@@ -529,11 +529,12 @@
    @param start		Start level
    @param stop		Stop level
    @param forbid	Do NOT allow this child type to exist
+   @param flags		set to 1 to note that it was defined inline
    @return		0 on success, nonzero on failure
  */
 int
 store_childtype(resource_child_t **childp, char *name, int start, int stop,
-		int forbid)
+		int forbid, int flags)
 {
 	int x = 0;
 	resource_child_t *child = *childp;
@@ -549,6 +550,7 @@
 		child[0].rc_startlevel = start;
 		child[0].rc_stoplevel = stop;
 		child[0].rc_forbid = forbid;
+		child[0].rc_flags = flags;
 		child[1].rc_name = NULL;
 
 		*childp = child;
@@ -565,6 +567,7 @@
 	child[x].rc_startlevel = start;
 	child[x].rc_stoplevel = stop;
 	child[x].rc_forbid = forbid;
+	child[x].rc_flags = flags;
 	child[x+1].rc_name = NULL;
 
 	*childp = child;
@@ -863,7 +866,7 @@
 		 */
 		if (childname)
 			store_childtype(&rr->rr_childtypes, childname,
-					startlevel, stoplevel, forbid);
+					startlevel, stoplevel, forbid, 0);
 	}
 
 	return 0;
--- cluster/rgmanager/src/daemons/restree.c	2006/11/03 16:29:58	1.10.2.2.6.9
+++ cluster/rgmanager/src/daemons/restree.c	2007/03/20 19:44:25	1.10.2.2.6.10
@@ -42,7 +42,7 @@
 
 /* XXX from resrules.c */
 int store_childtype(resource_child_t **childp, char *name, int start,
-		    int stop, int forbid);
+		    int stop, int forbid, int flags);
 int _res_op(resource_node_t **tree, resource_t *first, char *type,
 	    void * __attribute__((unused))ret, int op);
 void print_env(char **env);
@@ -90,6 +90,17 @@
 };
 
 
+/* XXX MEGA HACK */
+#ifdef NO_CCS
+static int _no_op_mode_ = 0;
+void
+_no_op_mode(int arg)
+{
+	_no_op_mode_ = arg;
+}
+#endif
+
+
 /**
    ocf_strerror
  */
@@ -359,6 +370,14 @@
 	}
 #endif
 
+#ifdef NO_CCS
+	if (_no_op_mode_) {
+		printf("[%s] %s:%s\n", res_ops[op],
+			res->r_rule->rr_type, res->r_attrs->ra_value);
+		return 0;
+	}
+#endif
+
 	childpid = fork();
 	if (childpid < 0) {
 		clulog(LOG_ERR, "%s: fork failed (%d)!\n", __func__, errno);
@@ -443,6 +462,97 @@
 }
 
 
+static inline int
+do_load_resource(int ccsfd, char *base,
+	         resource_rule_t *rule,
+	         resource_node_t **tree,
+		 resource_t **reslist,
+		 resource_node_t *parent,
+		 resource_node_t **newnode)
+{
+	char tok[512];
+	char *ref;
+	resource_node_t *node;
+	resource_t *curres;
+
+	snprintf(tok, sizeof(tok), "%s/@ref", base);
+
+#ifndef NO_CCS
+	if (ccs_get(ccsfd, tok, &ref) != 0) {
+#else
+	if (conf_get(tok, &ref) != 0) {
+#endif
+		/* There wasn't an existing resource. See if there
+		   is one defined inline */
+		curres = load_resource(ccsfd, rule, base);
+		if (!curres) {
+			/* No ref and no new one inline == 
+			   no more of the selected type */
+			return 1;
+		}
+
+	       	if (store_resource(reslist, curres) != 0) {
+	 		printf("Error storing %s resource\n",
+	 		       curres->r_rule->rr_type);
+	 		destroy_resource(curres);
+			return -1;
+	 	}
+
+		curres->r_flags = RF_INLINE;
+
+	} else {
+
+		curres = find_resource_by_ref(reslist, rule->rr_type,
+						      ref);
+		if (!curres) {
+			printf("Error: Reference to nonexistent "
+			       "resource %s (type %s)\n", ref,
+			       rule->rr_type);
+			free(ref);
+			return -1;
+		}
+
+		if (curres->r_flags & RF_INLINE) {
+			printf("Error: Reference to inlined "
+			       "resource %s (type %s) is illegal\n",
+			       ref, rule->rr_type);
+			free(ref);
+			return -1;
+		}
+		free(ref);
+	}
+
+	/* Load it if its max refs hasn't been exceeded */
+	if (rule->rr_maxrefs && (curres->r_refs >= rule->rr_maxrefs)){
+		printf("Warning: Max references exceeded for resource"
+		       " %s (type %s)\n", curres->r_attrs[0].ra_name,
+		       rule->rr_type);
+		return -1;
+	}
+
+	node = malloc(sizeof(*node));
+	if (!node)
+		return -1;
+
+	memset(node, 0, sizeof(*node));
+
+	//printf("New resource tree node: %s:%s \n", curres->r_rule->rr_type,curres->r_attrs->ra_value);
+
+	node->rn_child = NULL;
+	node->rn_parent = parent;
+	node->rn_resource = curres;
+	node->rn_state = RES_STOPPED;
+	node->rn_actions = (resource_act_t *)act_dup(curres->r_actions);
+	curres->r_refs++;
+
+	*newnode = node;
+
+	list_insert(tree, node);
+
+	return 0;
+}
+
+
 /**
    Build the resource tree.  If a new resource is defined inline, add it to
    the resource list.  All rules, however, must have already been read in.
@@ -468,127 +578,173 @@
 	char tok[512];
 	resource_rule_t *childrule;
 	resource_node_t *node;
-	resource_t *curres;
 	char *ref;
 	char *newchild;
-	int x, y, flags;
-
-	for (x = 1; ; x++) {
+	char *tmp;
+	int ccount = 0, x = 0, y = 0, flags = 0;
 
-		/* Search for base/type[x]/@ref - reference an existing
-		   resource */
-		snprintf(tok, sizeof(tok), "%s/%s[%d]/@ref", base,
-			 rule->rr_type, x);
-
-#ifndef NO_CCS
-		if (ccs_get(ccsfd, tok, &ref) != 0) {
-#else
-		if (conf_get(tok, &ref) != 0) {
-#endif
-			/* There wasn't an existing resource. See if there
-			   is one defined inline */
-			snprintf(tok, sizeof(tok), "%s/%s[%d]", base, 
-				 rule->rr_type, x);
-
-			curres = load_resource(ccsfd, rule, tok);
-			if (!curres)
-				/* No ref and no new one inline == 
-				   no more of the selected type */
-				break;
+	//printf("DESCEND: %s / %s\n", rule?rule->rr_type:"(none)", base);
 
-		       	if (store_resource(reslist, curres) != 0) {
-		 		printf("Error storing %s resource\n",
-		 		       curres->r_rule->rr_type);
-		 		destroy_resource(curres);
+	/* Pass 1: typed / defined children */
+	for (y = 0; rule && rule->rr_childtypes &&
+     	     rule->rr_childtypes[y].rc_name; y++) {
+		
+	
+		flags = 0;
+		list_for(rulelist, childrule, x) {
+			if (strcmp(rule->rr_childtypes[y].rc_name,
+				   childrule->rr_type))
 				continue;
-		 	}
-
-			curres->r_flags = RF_INLINE;
 
+			flags |= RFL_FOUND;
 
-		} else {
+			if (rule->rr_childtypes[y].rc_forbid)
+				flags |= RFL_FORBID;
 
-			curres = find_resource_by_ref(reslist, rule->rr_type,
-						      ref);
-			if (!curres) {
-				printf("Error: Reference to nonexistent "
-				       "resource %s (type %s)\n", ref,
-				       rule->rr_type);
-				free(ref);
-				continue;
-			}
-
-			if (curres->r_flags & RF_INLINE) {
-				printf("Error: Reference to inlined "
-				       "resource %s (type %s) is illegal\n",
-				       ref, rule->rr_type);
-				free(ref);
-				continue;
-			}
-			free(ref);
+			break;
 		}
 
-		/* Load it if its max refs hasn't been exceeded */
-		if (rule->rr_maxrefs && (curres->r_refs >= rule->rr_maxrefs)){
-			printf("Warning: Max references exceeded for resource"
-			       " %s (type %s)\n", curres->r_attrs[0].ra_name,
-			       rule->rr_type);
+		if (flags & RFL_FORBID)
+			/* Allow all *but* forbidden */
 			continue;
-		}
 
-		node = malloc(sizeof(*node));
-		if (!node)
+		if (!(flags & RFL_FOUND))
+			/* Not found?  Wait for pass 2 */
 			continue;
 
-		memset(node, 0, sizeof(*node));
+		//printf("looking for %s %s @ %s\n",
+			//rule->rr_childtypes[y].rc_name,
+			//childrule->rr_type, base);
+		for (x = 1; ; x++) {
+
+			/* Search for base/type[x]/@ref - reference an existing
+			   	resource */
+			snprintf(tok, sizeof(tok), "%s/%s[%d]", base,
+				 childrule->rr_type, x);
+
+			flags = 1;
+			switch(do_load_resource(ccsfd, tok, childrule, tree,
+						reslist, parent, &node)) {
+			case -1:
+				continue;
+			case 1:
+				/* 1 == no more */
+				//printf("No resource found @ %s\n", tok);
+				flags = 0;
+				break;
+			case 0:
+				break;
+			}
+			if (!flags)
+				break;
+
+			/* Got a child :: bump count */
+			snprintf(tok, sizeof(tok), "%s/%s[%d]", base,
+				 childrule->rr_type, x);
 
-		node->rn_child = NULL;
-		node->rn_parent = parent;
-		node->rn_resource = curres;
-		node->rn_state = RES_STOPPED;
-		node->rn_actions = (resource_act_t *)act_dup(curres->r_actions);
-		curres->r_refs++;
+			/* Kaboom */
+			build_tree(ccsfd, &node->rn_child, node, childrule,
+				   rulelist, reslist, tok);
 
-		list_insert(tree, node);
+		}
+	}
 
-		list_do(rulelist, childrule) {
 
-			flags = 0;
-			for (y = 0; rule->rr_childtypes &&
-		     	     rule->rr_childtypes[y].rc_name; y++) {
+	/* Pass 2: untyped children */
+	for (ccount=1; ; ccount++) {
+		snprintf(tok, sizeof(tok), "%s/child::*[%d]", base, ccount);
 
-				if (strcmp(rule->rr_childtypes[y].rc_name,
-					   childrule->rr_type))
-					continue;
+#ifndef NO_CCS
+		if (ccs_get(ccsfd, tok, &ref) != 0) {
+#else
+		if (conf_get(tok, &ref) != 0) {
+#endif
+			/* End of the line. */
+			//printf("End of the line: %s\n", tok);
+			break;
+		}
 
-				flags |= RFL_FOUND;
+		tmp = strchr(ref, '=');
+		if (tmp) {
+			*tmp = 0;
+		} else {
+			/* no = sign... bad */
+			free(ref);
+			continue;
+		}
 
-				if (rule->rr_childtypes[y].rc_forbid)
-					flags |= RFL_FORBID;
+		/* Find the resource rule */
+		flags = 0;
+		list_for(rulelist, childrule, x) {
+			if (!strcasecmp(childrule->rr_type, ref)) {
+				/* Ok, matching rule found */
+				flags = 1;
+				break;
 			}
+		}
+		/* No resource rule matching the child?  Press on... */
+		if (!flags)
+			continue;
 
-			if (flags & RFL_FORBID)
-				/* Allow all *but* forbidden */
+		flags = 0;
+		/* Don't descend on anything we should have already picked
+		   up on in the above loop */
+		for (y = 0; rule && rule->rr_childtypes &&
+		     rule->rr_childtypes[y].rc_name; y++) {
+			/* SKIP defined child types of any type */
+			if (strcmp(rule->rr_childtypes[y].rc_name, ref))
 				continue;
-
-			/* XXX Store new child type with start/stop level 0*/
-			/*     This is really ugly to do it here */
-			if (!(flags & RFL_FOUND)) {
-				newchild = strdup(childrule->rr_type);
-				store_childtype(&rule->rr_childtypes,
-						newchild, 0, 0, 0);
+			if (rule->rr_childtypes[y].rc_flags == 0) {
+				/* 2 = defined as a real child */
+				flags = 2;
+				break;
 			}
 
-			snprintf(tok, sizeof(tok), "%s/%s[%d]", base,
-				 rule->rr_type, x);
+			flags = 1;
+			break;
+		}
 
-			/* Kaboom */
-			build_tree(ccsfd, &node->rn_child, node, childrule,
-				   rulelist, reslist, tok);
+		if (flags == 2) {
+			free(ref);
+			continue;
+		}
+
+		/* store it once */
+		if (!flags && rule) {
+			//printf("Storing new child %s of %s\n",
+			       //ref, rule->rr_type);
+			newchild = strdup(ref);
+			store_childtype(&rule->rr_childtypes,
+					newchild, 0, 0, 0, 1);
+		}
+		free(ref);
+
+		x = 1;
+		switch(do_load_resource(ccsfd, tok, childrule, tree,
+				        reslist, parent, &node)) {
+		case -1:
+			continue;
+		case 1:
+			/* no more found */
+			x = 0;
+			printf("No resource found @ %s\n", tok);
+			break;
+		case 0:
+			/* another is found */
+			break;
+		}
+		if (!x) /* no more found */
+			break;
 
-		} while (!list_done(rulelist, childrule));
+		/* childrule = rule set of this child at this point */
+		/* tok = set above; if we got this far, we're all set */
+		/* Kaboom */
+
+		build_tree(ccsfd, &node->rn_child, node, childrule,
+			   rulelist, reslist, tok);
 	}
 
+	//printf("ASCEND: %s / %s\n", rule?rule->rr_type:"(none)", base);
 	return 0;
 }
 
@@ -620,7 +776,7 @@
 		if (!curr->rr_root)
 			continue;
 
-		build_tree(ccsfd, &root, NULL, curr, rulelist, reslist, tok);
+		build_tree(ccsfd, &root, NULL, NULL/*curr*/, rulelist, reslist, tok);
 
 	} while (!list_done(rulelist, curr));
 
@@ -647,9 +803,9 @@
 			destroy_resource_tree(&(*tree)->rn_child);
 
 		list_remove(tree, node);
-               if(node->rn_actions){
-                       free(node->rn_actions);
-               }
+		if(node->rn_actions){
+			free(node->rn_actions);
+		}
 		free(node);
 	}
 }
@@ -750,6 +906,7 @@
 }
 
 
+#if 0
 static inline int
 _do_child_default_level(resource_node_t **tree, resource_t *first,
 			void *ret, int op)
@@ -786,6 +943,55 @@
 
 	return 0;
 }
+#endif
+
+
+static inline int
+_xx_child_internal(resource_node_t *node, resource_node_t *child, void *ret,
+		   int op)
+{
+	int x;
+	resource_rule_t *rule = node->rn_resource->r_rule;
+
+	for (x = 0; rule->rr_childtypes &&
+     	     rule->rr_childtypes[x].rc_name; x++) {
+		if (!strcmp(child->rn_resource->r_rule->rr_type,
+			    rule->rr_childtypes[x].rc_name)) {
+			if (rule->rr_childtypes[x].rc_startlevel ||
+			    rule->rr_childtypes[x].rc_stoplevel) {
+				return 0;
+			}
+		}
+	}
+
+	return _res_op_internal(&child, child->rn_resource,
+	 		       child->rn_resource->r_rule->rr_type,
+			       ret, op, child);
+}
+
+
+static inline int
+_do_child_default_level(resource_node_t **tree, resource_t *first,
+			void *ret, int op)
+{
+	resource_node_t *node = *tree, *child;
+	int y, rv = 0;
+
+	if (op == RS_START || op == RS_STATUS) {
+		list_for(&node->rn_child, child, y) {
+			rv = _xx_child_internal(node, child, ret, op);
+			if (rv)
+				return rv;
+		}
+	} else {
+		list_for_rev(&node->rn_child, child, y) {
+			rv += _xx_child_internal(node, child, ret, op);
+		}
+	}
+
+	return rv;
+}
+
 
 
 
@@ -970,6 +1176,7 @@
 			in the subtree).
    @see			_res_op_by_level res_exec
  */
+#if 0
 int
 _res_op(resource_node_t **tree, resource_t *first,
 	char *type, void * __attribute__((unused))ret, int realop)
@@ -1090,7 +1297,159 @@
 
 	return 0;
 }
+#endif
+
+
+static inline int
+_res_op_internal(resource_node_t **tree, resource_t *first,
+		 char *type, void *__attribute__((unused))ret, int realop,
+		 resource_node_t *node)
+{
+	int rv, me, op;
+
+	/* Restore default operation. */
+	op = realop;
+
+	/* If we're starting by type, do that funky thing. */
+	if (type && strlen(type) &&
+	    strcmp(node->rn_resource->r_rule->rr_type, type))
+		return 0;
+
+	/* If the resource is found, all nodes in the subtree must
+	   have the operation performed as well. */
+	me = !first || (node->rn_resource == first);
+
+	//printf("begin %s: %s %s [0x%x]\n", res_ops[op],
+	       //node->rn_resource->r_rule->rr_type,
+	       //primary_attr_value(node->rn_resource),
+	       //node->rn_flags);
+
+	if (me) {
+		/*
+		   If we've been marked as a node which
+		   needs to be started or stopped, clear
+		   that flag and start/stop this resource
+		   and all resource babies.
+
+		   Otherwise, don't do anything; look for
+		   children with RF_NEEDSTART and
+		   RF_NEEDSTOP flags.
+
+		   CONDSTART and CONDSTOP are no-ops if
+		   the appropriate flag is not set.
+		 */
+	       	if ((op == RS_CONDSTART) &&
+		    (node->rn_flags & RF_NEEDSTART)) {
+			printf("Node %s:%s - CONDSTART\n",
+			       node->rn_resource->r_rule->rr_type,
+			       primary_attr_value(node->rn_resource));
+			op = RS_START;
+		}
 
+		if ((op == RS_CONDSTOP) &&
+		    (node->rn_flags & RF_NEEDSTOP)) {
+			printf("Node %s:%s - CONDSTOP\n",
+			       node->rn_resource->r_rule->rr_type,
+			       primary_attr_value(node->rn_resource));
+			op = RS_STOP;
+		}
+	}
+
+	/* Start starts before children */
+	if (me && (op == RS_START)) {
+		node->rn_flags &= ~RF_NEEDSTART;
+
+		rv = res_exec(node, op, 0);
+		if (rv != 0) {
+			node->rn_state = RES_FAILED;
+			return rv;
+		}
+
+		set_time("start", 0, node);
+		clear_checks(node);
+
+		if (node->rn_state != RES_STARTED) {
+			++node->rn_resource->r_incarnations;
+			node->rn_state = RES_STARTED;
+		}
+	} else if (me && (op == RS_STATUS)) {
+		/* Check status before children*/
+		rv = do_status(node);
+		if (rv != 0)
+			return rv;
+	}
+
+	if (node->rn_child) {
+		rv = _res_op_by_level(&node, me?NULL:first, ret, op);
+		if (rv != 0)
+			return rv;
+	}
+
+	/* Stop should occur after children have stopped */
+	if (me && (op == RS_STOP)) {
+		node->rn_flags &= ~RF_NEEDSTOP;
+		rv = res_exec(node, op, 0);
+
+		if (rv != 0) {
+			node->rn_state = RES_FAILED;
+			return rv;
+		}
+
+		if (node->rn_state != RES_STOPPED) {
+			--node->rn_resource->r_incarnations;
+			node->rn_state = RES_STOPPED;
+		}
+	}
+
+	//printf("end %s: %s %s\n", res_ops[op],
+	       //node->rn_resource->r_rule->rr_type,
+	       //primary_attr_value(node->rn_resource));
+	
+	return 0;
+}
+
+
+/**
+   Nasty codependent function.  Perform an operation by type for all siblings
+   at some point in the tree.  This allows indirectly-dependent resources
+   (such as IP addresses and user scripts) to have ordering without requiring
+   a direct dependency.
+
+   @param tree		Resource tree to search/perform operations on
+   @param first		Resource we're looking to perform the operation on,
+   			if one exists.
+   @param type		Type to look for.
+   @param ret		Unused, but will be used to store status information
+   			such as resources consumed, etc, in the future.
+   @param realop	Operation to perform if either first is found,
+   			or no first is declared (in which case, all nodes
+			in the subtree).
+   @see			_res_op_by_level res_exec
+ */
+int
+_res_op(resource_node_t **tree, resource_t *first,
+	char *type, void * __attribute__((unused))ret, int realop)
+{
+  	resource_node_t *node;
+ 	int count = 0, rv;
+ 	
+ 	if (realop == RS_STOP) {
+ 		list_for_rev(tree, node, count) {
+ 			rv = _res_op_internal(tree, first, type, ret, realop,
+ 					      node);
+ 			if (rv != 0) 
+ 				return rv;
+ 		}
+ 	} else {
+ 		list_for(tree, node, count) {
+ 			rv = _res_op_internal(tree, first, type, ret, realop,
+ 					      node);
+ 			if (rv != 0) 
+ 				return rv;
+ 		}
+ 	}
+	return 0;
+}
 
 /**
    Start all occurrences of a resource in a tree
--- cluster/rgmanager/src/daemons/test.c	2005/03/21 22:01:30	1.1.2.3
+++ cluster/rgmanager/src/daemons/test.c	2007/03/20 19:44:25	1.1.2.3.6.1
@@ -30,8 +30,8 @@
 	"\trules\n\n"
 
 
+void _no_op_mode(int);
 void malloc_dump_table(void);
-
 char *agentpath = RESOURCE_ROOTDIR;
 
 
@@ -59,6 +59,7 @@
 }
 
 
+
 int
 test_func(int argc, char **argv)
 {
@@ -277,6 +278,11 @@
 			shift();
 			ret = test_func(argc, argv);
 			goto out;
+		} else if (!strcmp(argv[1], "noop")) {
+			shift();
+			_no_op_mode(1);
+			ret = test_func(argc, argv);
+			goto out;
 		} else if (!strcmp(argv[1], "rules")) {
 			shift();
 			ret = rules_func(argc, argv);
--- cluster/rgmanager/src/daemons/tests/delta-test002-test003.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test002-test003.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -11,6 +11,7 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/httpd [ unique required ]
+  service_name [ inherit("service%name") ]
 
 Resource type: service [ROOT]
 Instances: 1/1
@@ -28,5 +29,6 @@
   script [ NEEDSTART ] {
     name = "initscript";
     file = "/etc/init.d/httpd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test003-test004.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test003-test004.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -4,6 +4,7 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/httpd [ unique required ]
+  service_name [ inherit("service%name") ]
 
 Resource type: service [ROOT]
 Instances: 1/1
@@ -17,6 +18,7 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
 
 Resource type: service [ROOT]
 Instances: 1/1
@@ -30,6 +32,7 @@
   script [ NEEDSTOP ] {
     name = "initscript";
     file = "/etc/init.d/httpd";
+    service_name = "test1";
   }
 }
 === New Resource Tree ===
@@ -38,5 +41,6 @@
   script [ NEEDSTART ] {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test004-test005.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test004-test005.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -4,6 +4,7 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
 
 Resource type: service [ROOT]
 Instances: 1/1
@@ -17,6 +18,13 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip [NEEDSTART]
 Instances: 1/1
@@ -24,12 +32,7 @@
 Attributes:
   address = 192.168.1.2 [ primary unique ]
   monitor_link = 1
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
+  nfslock [ inherit("service%nfslock") ]
 
 === Old Resource Tree ===
 service {
@@ -37,6 +40,7 @@
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 === New Resource Tree ===
@@ -45,9 +49,11 @@
   ip [ NEEDSTART ] {
     address = "192.168.1.2";
     monitor_link = "1";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test005-test006.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test005-test006.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -4,6 +4,13 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip [NEEDSTOP]
 Instances: 1/1
@@ -11,12 +18,7 @@
 Attributes:
   address = 192.168.1.2 [ primary unique ]
   monitor_link = 1
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
+  nfslock [ inherit("service%nfslock") ]
 
 === New Resource List ===
 Resource type: script
@@ -24,6 +26,13 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip [NEEDSTART]
 Instances: 1/1
@@ -31,12 +40,7 @@
 Attributes:
   address = 192.168.1.2 [ primary unique ]
   monitor_link = yes
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
+  nfslock [ inherit("service%nfslock") ]
 
 === Old Resource Tree ===
 service {
@@ -44,10 +48,12 @@
   ip [ NEEDSTOP ] {
     address = "192.168.1.2";
     monitor_link = "1";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 === New Resource Tree ===
@@ -56,9 +62,11 @@
   ip [ NEEDSTART ] {
     address = "192.168.1.2";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test006-test007.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test006-test007.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -4,6 +4,13 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip [NEEDSTOP]
 Instances: 1/1
@@ -11,12 +18,7 @@
 Attributes:
   address = 192.168.1.2 [ primary unique ]
   monitor_link = yes
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
+  nfslock [ inherit("service%nfslock") ]
 
 === New Resource List ===
 Resource type: script
@@ -24,6 +26,13 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip [NEEDSTART]
 Instances: 1/1
@@ -31,12 +40,7 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
+  nfslock [ inherit("service%nfslock") ]
 
 === Old Resource Tree ===
 service {
@@ -44,10 +48,12 @@
   ip [ NEEDSTOP ] {
     address = "192.168.1.2";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 === New Resource Tree ===
@@ -56,9 +62,11 @@
   ip [ NEEDSTART ] {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test007-test008.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test007-test008.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -4,13 +4,7 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
+  service_name [ inherit("service%name") ]
 
 Resource type: service [ROOT]
 Instances: 1/1
@@ -18,21 +12,27 @@
 Attributes:
   name = test1 [ primary unique required ]
 
-=== New Resource List ===
-Resource type: fs [NEEDSTART]
-Instances: 0/1
-Agent: fs.sh
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
 Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
+=== New Resource List ===
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -40,12 +40,17 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
+Resource type: fs [NEEDSTART]
+Instances: 0/1
+Agent: fs.sh
 Attributes:
-  name = test1 [ primary unique required ]
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 === Old Resource Tree ===
 service {
@@ -53,10 +58,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 === New Resource Tree ===
@@ -65,9 +72,11 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test008-test009.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test008-test009.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,18 +1,16 @@
 === Old Resource List ===
-Resource type: fs
-Instances: 0/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -20,28 +18,31 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
-=== New Resource List ===
 Resource type: fs
-Instances: 1/1
+Instances: 0/1
 Agent: fs.sh
 Attributes:
   name = mount1 [ primary ]
   mountpoint = /mnt/cluster [ unique required ]
   device = /dev/sdb8 [ unique required ]
   fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
+=== New Resource List ===
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -49,12 +50,17 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
-Resource type: service [ROOT]
+Resource type: fs
 Instances: 1/1
-Agent: service.sh
+Agent: fs.sh
 Attributes:
-  name = test1 [ primary unique required ]
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 === Old Resource Tree ===
 service {
@@ -62,10 +68,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 === New Resource Tree ===
@@ -76,13 +84,16 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
   }
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test009-test010.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test009-test010.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,18 +1,16 @@
 === Old Resource List ===
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -20,14 +18,8 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
-=== New Resource List ===
 Resource type: fs
 Instances: 1/1
 Agent: fs.sh
@@ -36,12 +28,21 @@
   mountpoint = /mnt/cluster [ unique required ]
   device = /dev/sdb8 [ unique required ]
   fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
+=== New Resource List ===
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -49,6 +50,17 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 Resource type: nfsexport [NEEDSTART]
 Agent: nfsexport.sh
@@ -56,12 +68,8 @@
   name = Dummy Export [ primary ]
   device [ inherit("device") ]
   path [ inherit("mountpoint") ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
 === Old Resource Tree ===
 service {
@@ -71,14 +79,17 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
   }
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 === New Resource Tree ===
@@ -89,13 +100,16 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
   }
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test010-test011.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test010-test011.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,4 +1,25 @@
 === Old Resource List ===
+Resource type: script
+Agent: script.sh
+Attributes:
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
+
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
 Resource type: fs
 Instances: 1/1
 Agent: fs.sh
@@ -7,12 +28,30 @@
   mountpoint = /mnt/cluster [ unique required ]
   device = /dev/sdb8 [ unique required ]
   fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: nfsexport
+Agent: nfsexport.sh
+Attributes:
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
+=== New Resource List ===
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -20,6 +59,17 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 Resource type: nfsexport
 Agent: nfsexport.sh
@@ -27,20 +77,17 @@
   name = Dummy Export [ primary ]
   device [ inherit("device") ]
   path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
-=== New Resource List ===
 Resource type: nfsclient [NEEDSTART]
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
 Resource type: nfsclient [NEEDSTART]
@@ -49,6 +96,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient [NEEDSTART]
@@ -57,6 +106,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient [NEEDSTART]
@@ -65,6 +116,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient [NEEDSTART]
@@ -73,43 +126,10 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
-Resource type: script
-Agent: script.sh
-Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
-
-Resource type: nfsexport
-Agent: nfsexport.sh
-Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
 === Old Resource Tree ===
 service {
   name = "test1";
@@ -118,14 +138,17 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
   }
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 === New Resource Tree ===
@@ -136,20 +159,27 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport [ NEEDSTART ] {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
     }
@@ -157,9 +187,11 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test011-test012.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test011-test012.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,10 +1,52 @@
 === Old Resource List ===
+Resource type: script
+Agent: script.sh
+Attributes:
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
+
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: nfsexport
+Agent: nfsexport.sh
+Attributes:
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
+
 Resource type: nfsclient
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
 Resource type: nfsclient
@@ -13,6 +55,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -21,6 +65,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -29,6 +75,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient [NEEDSTOP]
@@ -37,22 +85,23 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
+=== New Resource List ===
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -60,6 +109,17 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 Resource type: nfsexport
 Agent: nfsexport.sh
@@ -67,20 +127,17 @@
   name = Dummy Export [ primary ]
   device [ inherit("device") ]
   path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
-=== New Resource List ===
 Resource type: nfsclient
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
 Resource type: nfsclient
@@ -89,6 +146,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -97,6 +156,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -105,6 +166,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient [NEEDSTART]
@@ -113,43 +176,10 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
-Resource type: script
-Agent: script.sh
-Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
-
-Resource type: nfsexport
-Agent: nfsexport.sh
-Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
 === Old Resource Tree ===
 service {
   name = "test1";
@@ -158,20 +188,27 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
     }
@@ -179,10 +216,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 === New Resource Tree ===
@@ -193,26 +232,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient [ NEEDSTART ] {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
     }
@@ -220,9 +268,11 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test012-test013.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test012-test013.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,10 +1,52 @@
 === Old Resource List ===
+Resource type: script
+Agent: script.sh
+Attributes:
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
+
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: nfsexport
+Agent: nfsexport.sh
+Attributes:
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
+
 Resource type: nfsclient
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
 Resource type: nfsclient
@@ -13,6 +55,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -21,6 +65,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -29,6 +75,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient [NEEDSTOP]
@@ -37,22 +85,23 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
+=== New Resource List ===
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -60,6 +109,17 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 Resource type: nfsexport
 Agent: nfsexport.sh
@@ -67,20 +127,17 @@
   name = Dummy Export [ primary ]
   device [ inherit("device") ]
   path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
-=== New Resource List ===
 Resource type: nfsclient
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
 Resource type: nfsclient
@@ -89,6 +146,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -97,6 +156,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -105,6 +166,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient [NEEDSTART]
@@ -113,43 +176,10 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
-Resource type: script
-Agent: script.sh
-Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
-
-Resource type: nfsexport
-Agent: nfsexport.sh
-Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
 === Old Resource Tree ===
 service {
   name = "test1";
@@ -158,26 +188,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient [ NEEDSTOP ] {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
     }
@@ -185,10 +224,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 === New Resource Tree ===
@@ -199,26 +240,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient [ NEEDSTART ] {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -226,9 +276,11 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test013-test014.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test013-test014.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,10 +1,52 @@
 === Old Resource List ===
+Resource type: script
+Agent: script.sh
+Attributes:
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
+
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: nfsexport
+Agent: nfsexport.sh
+Attributes:
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
+
 Resource type: nfsclient
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
 Resource type: nfsclient
@@ -13,6 +55,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -21,6 +65,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -29,6 +75,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -37,22 +85,29 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
+=== New Resource List ===
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
+
+Resource type: service [ROOT] [NEEDSTART]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test2 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -60,6 +115,35 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: ip [NEEDSTART]
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.4 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: fs [NEEDSTART]
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount2 [ primary ]
+  mountpoint = /mnt/cluster2 [ unique required ]
+  device = /dev/sdb9 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 Resource type: nfsexport
 Agent: nfsexport.sh
@@ -67,20 +151,17 @@
   name = Dummy Export [ primary ]
   device [ inherit("device") ]
   path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
-=== New Resource List ===
 Resource type: nfsclient
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
 Resource type: nfsclient
@@ -89,6 +170,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -97,6 +180,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -105,6 +190,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -113,65 +200,10 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
-Resource type: fs [NEEDSTART]
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount2 [ primary ]
-  mountpoint = /mnt/cluster2 [ unique required ]
-  device = /dev/sdb9 [ unique required ]
-  fstype = ext3
-
-Resource type: script
-Agent: script.sh
-Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
-
-Resource type: ip [NEEDSTART]
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.4 [ primary unique ]
-  monitor_link = yes
-
-Resource type: nfsexport
-Agent: nfsexport.sh
-Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
-Resource type: service [ROOT] [NEEDSTART]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test2 [ primary unique required ]
-
 === Old Resource Tree ===
 service {
   name = "test1";
@@ -180,26 +212,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -207,10 +248,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 === New Resource Tree ===
@@ -221,26 +264,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -248,10 +300,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 service [ NEEDSTART ] {
@@ -261,26 +315,35 @@
     mountpoint = "/mnt/cluster2";
     device = "/dev/sdb9";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb9";
       path = "/mnt/cluster2";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -288,9 +351,11 @@
   ip {
     address = "192.168.1.4";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test2";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test014-test015.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test014-test015.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,10 +1,76 @@
 === Old Resource List ===
+Resource type: script
+Agent: script.sh
+Attributes:
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test2 [ primary unique required ]
+
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.4 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount2 [ primary ]
+  mountpoint = /mnt/cluster2 [ unique required ]
+  device = /dev/sdb9 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: nfsexport
+Agent: nfsexport.sh
+Attributes:
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
+
 Resource type: nfsclient [NEEDSTOP]
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
 Resource type: nfsclient
@@ -13,6 +79,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -21,6 +89,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -29,6 +99,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -37,31 +109,29 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
+=== New Resource List ===
+Resource type: script
+Agent: script.sh
 Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
 
-Resource type: fs
+Resource type: service [ROOT]
 Instances: 1/1
-Agent: fs.sh
+Agent: service.sh
 Attributes:
-  name = mount2 [ primary ]
-  mountpoint = /mnt/cluster2 [ unique required ]
-  device = /dev/sdb9 [ unique required ]
-  fstype = ext3
+  name = test1 [ primary unique required ]
 
-Resource type: script
-Agent: script.sh
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
 Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
+  name = test2 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -69,6 +139,7 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
 Resource type: ip
 Instances: 1/1
@@ -76,33 +147,45 @@
 Attributes:
   address = 192.168.1.4 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
-Resource type: nfsexport
-Agent: nfsexport.sh
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
 Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
-Resource type: service [ROOT]
+Resource type: fs
 Instances: 1/1
-Agent: service.sh
+Agent: fs.sh
 Attributes:
-  name = test1 [ primary unique required ]
+  name = mount2 [ primary ]
+  mountpoint = /mnt/cluster2 [ unique required ]
+  device = /dev/sdb9 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
+Resource type: nfsexport
+Agent: nfsexport.sh
 Attributes:
-  name = test2 [ primary unique required ]
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
-=== New Resource List ===
 Resource type: nfsclient [NEEDSTART]
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,sync
 
 Resource type: nfsclient
@@ -111,6 +194,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -119,6 +204,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -127,6 +214,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -135,65 +224,10 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount2 [ primary ]
-  mountpoint = /mnt/cluster2 [ unique required ]
-  device = /dev/sdb9 [ unique required ]
-  fstype = ext3
-
-Resource type: script
-Agent: script.sh
-Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.4 [ primary unique ]
-  monitor_link = yes
-
-Resource type: nfsexport
-Agent: nfsexport.sh
-Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test2 [ primary unique required ]
-
 === Old Resource Tree ===
 service {
   name = "test1";
@@ -202,26 +236,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient [ NEEDSTOP ] {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -229,10 +272,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 service {
@@ -242,26 +287,35 @@
     mountpoint = "/mnt/cluster2";
     device = "/dev/sdb9";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb9";
       path = "/mnt/cluster2";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient [ NEEDSTOP ] {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -269,10 +323,12 @@
   ip {
     address = "192.168.1.4";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test2";
   }
 }
 === New Resource Tree ===
@@ -283,26 +339,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient [ NEEDSTART ] {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw,sync";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -310,10 +375,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 service {
@@ -323,26 +390,35 @@
     mountpoint = "/mnt/cluster2";
     device = "/dev/sdb9";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb9";
       path = "/mnt/cluster2";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient [ NEEDSTART ] {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw,sync";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -350,9 +426,11 @@
   ip {
     address = "192.168.1.4";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test2";
   }
 }
--- cluster/rgmanager/src/daemons/tests/delta-test015-test016.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/delta-test015-test016.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,11 +1,77 @@
 Warning: Max references exceeded for resource address (type ip)
 === Old Resource List ===
+Resource type: script
+Agent: script.sh
+Attributes:
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test2 [ primary unique required ]
+
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.4 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount2 [ primary ]
+  mountpoint = /mnt/cluster2 [ unique required ]
+  device = /dev/sdb9 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: nfsexport
+Agent: nfsexport.sh
+Attributes:
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
+
 Resource type: nfsclient
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,sync
 
 Resource type: nfsclient
@@ -14,6 +80,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -22,6 +90,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -30,6 +100,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -38,31 +110,29 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
+=== New Resource List ===
+Resource type: script
+Agent: script.sh
 Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
 
-Resource type: fs
+Resource type: service [ROOT]
 Instances: 1/1
-Agent: fs.sh
+Agent: service.sh
 Attributes:
-  name = mount2 [ primary ]
-  mountpoint = /mnt/cluster2 [ unique required ]
-  device = /dev/sdb9 [ unique required ]
-  fstype = ext3
+  name = test1 [ primary unique required ]
 
-Resource type: script
-Agent: script.sh
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
 Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
+  name = test2 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -70,6 +140,7 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
 Resource type: ip
 Instances: 1/1
@@ -77,33 +148,45 @@
 Attributes:
   address = 192.168.1.4 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
-Resource type: nfsexport
-Agent: nfsexport.sh
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
 Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
-Resource type: service [ROOT]
+Resource type: fs
 Instances: 1/1
-Agent: service.sh
+Agent: fs.sh
 Attributes:
-  name = test1 [ primary unique required ]
+  name = mount2 [ primary ]
+  mountpoint = /mnt/cluster2 [ unique required ]
+  device = /dev/sdb9 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
+Resource type: nfsexport
+Agent: nfsexport.sh
 Attributes:
-  name = test2 [ primary unique required ]
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
-=== New Resource List ===
 Resource type: nfsclient
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,sync
 
 Resource type: nfsclient
@@ -112,6 +195,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -120,6 +205,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -128,6 +215,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -136,65 +225,10 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount2 [ primary ]
-  mountpoint = /mnt/cluster2 [ unique required ]
-  device = /dev/sdb9 [ unique required ]
-  fstype = ext3
-
-Resource type: script
-Agent: script.sh
-Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.4 [ primary unique ]
-  monitor_link = yes
-
-Resource type: nfsexport
-Agent: nfsexport.sh
-Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test2 [ primary unique required ]
-
 === Old Resource Tree ===
 service {
   name = "test1";
@@ -203,26 +237,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw,sync";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -230,10 +273,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 service {
@@ -243,26 +288,35 @@
     mountpoint = "/mnt/cluster2";
     device = "/dev/sdb9";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb9";
       path = "/mnt/cluster2";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw,sync";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -270,10 +324,12 @@
   ip {
     address = "192.168.1.4";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test2";
   }
 }
 === New Resource Tree ===
@@ -284,26 +340,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw,sync";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -311,10 +376,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 service {
@@ -324,26 +391,35 @@
     mountpoint = "/mnt/cluster2";
     device = "/dev/sdb9";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb9";
       path = "/mnt/cluster2";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw,sync";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -351,9 +427,11 @@
   ip {
     address = "192.168.1.4";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test2";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test003.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test003.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -4,6 +4,7 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/httpd [ unique required ]
+  service_name [ inherit("service%name") ]
 
 Resource type: service [ROOT]
 Instances: 1/1
@@ -17,5 +18,6 @@
   script {
     name = "initscript";
     file = "/etc/init.d/httpd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test004.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test004.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -4,6 +4,7 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
 
 Resource type: service [ROOT]
 Instances: 1/1
@@ -17,5 +18,6 @@
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test005.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test005.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -4,6 +4,13 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -11,12 +18,7 @@
 Attributes:
   address = 192.168.1.2 [ primary unique ]
   monitor_link = 1
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
+  nfslock [ inherit("service%nfslock") ]
 
 === Resource Tree ===
 service {
@@ -24,9 +26,11 @@
   ip {
     address = "192.168.1.2";
     monitor_link = "1";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test006.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test006.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -4,6 +4,13 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -11,12 +18,7 @@
 Attributes:
   address = 192.168.1.2 [ primary unique ]
   monitor_link = yes
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
+  nfslock [ inherit("service%nfslock") ]
 
 === Resource Tree ===
 service {
@@ -24,9 +26,11 @@
   ip {
     address = "192.168.1.2";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test007.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test007.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -4,6 +4,13 @@
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -11,12 +18,7 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
+  nfslock [ inherit("service%nfslock") ]
 
 === Resource Tree ===
 service {
@@ -24,9 +26,11 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test008.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test008.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,18 +1,16 @@
 === Resources List ===
-Resource type: fs
-Instances: 0/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -20,12 +18,17 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
+Resource type: fs
+Instances: 0/1
+Agent: fs.sh
 Attributes:
-  name = test1 [ primary unique required ]
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 === Resource Tree ===
 service {
@@ -33,9 +36,11 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test009.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test009.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,18 +1,16 @@
 === Resources List ===
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -20,12 +18,17 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
-Resource type: service [ROOT]
+Resource type: fs
 Instances: 1/1
-Agent: service.sh
+Agent: fs.sh
 Attributes:
-  name = test1 [ primary unique required ]
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 === Resource Tree ===
 service {
@@ -35,13 +38,16 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
   }
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test010.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test010.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,18 +1,16 @@
 === Resources List ===
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
 Resource type: script
 Agent: script.sh
 Attributes:
   name = initscript [ primary unique ]
   file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
 
 Resource type: ip
 Instances: 1/1
@@ -20,6 +18,17 @@
 Attributes:
   address = 192.168.1.3 [ primary unique ]
   monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 Resource type: nfsexport
 Agent: nfsexport.sh
@@ -27,12 +36,8 @@
   name = Dummy Export [ primary ]
   device [ inherit("device") ]
   path [ inherit("mountpoint") ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
 === Resource Tree ===
 service {
@@ -42,13 +47,16 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
   }
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test011.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test011.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,10 +1,52 @@
 === Resources List ===
+Resource type: script
+Agent: script.sh
+Attributes:
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
+
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: nfsexport
+Agent: nfsexport.sh
+Attributes:
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
+
 Resource type: nfsclient
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
 Resource type: nfsclient
@@ -13,6 +55,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -21,6 +65,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -29,6 +75,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -37,43 +85,10 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
-Resource type: script
-Agent: script.sh
-Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
-
-Resource type: nfsexport
-Agent: nfsexport.sh
-Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
 === Resource Tree ===
 service {
   name = "test1";
@@ -82,20 +97,27 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
     }
@@ -103,9 +125,11 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test012.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test012.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,10 +1,52 @@
 === Resources List ===
+Resource type: script
+Agent: script.sh
+Attributes:
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
+
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: nfsexport
+Agent: nfsexport.sh
+Attributes:
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
+
 Resource type: nfsclient
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
 Resource type: nfsclient
@@ -13,6 +55,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -21,6 +65,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -29,6 +75,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -37,43 +85,10 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
-Resource type: script
-Agent: script.sh
-Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
-
-Resource type: nfsexport
-Agent: nfsexport.sh
-Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
 === Resource Tree ===
 service {
   name = "test1";
@@ -82,26 +97,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
     }
@@ -109,9 +133,11 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test013.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test013.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,10 +1,52 @@
 === Resources List ===
+Resource type: script
+Agent: script.sh
+Attributes:
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
+
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
+Attributes:
+  name = test1 [ primary unique required ]
+
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
+Attributes:
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
+
+Resource type: fs
+Instances: 1/1
+Agent: fs.sh
+Attributes:
+  name = mount1 [ primary ]
+  mountpoint = /mnt/cluster [ unique required ]
+  device = /dev/sdb8 [ unique required ]
+  fstype = ext3
+  nfslock [ inherit("nfslock") ]
+
+Resource type: nfsexport
+Agent: nfsexport.sh
+Attributes:
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
+
 Resource type: nfsclient
 Agent: nfsclient.sh
 Attributes:
   name = User group [ primary unique ]
   target = @users [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = ro
 
 Resource type: nfsclient
@@ -13,6 +55,8 @@
   name = Admin group [ primary unique ]
   target = @admin [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
 Resource type: nfsclient
@@ -21,6 +65,8 @@
   name = yellow [ primary unique ]
   target = yellow [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -29,6 +75,8 @@
   name = magenta [ primary unique ]
   target = magenta [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw,no_root_squash
 
 Resource type: nfsclient
@@ -37,43 +85,10 @@
   name = red [ primary unique ]
   target = red [ required ]
   path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
   options = rw
 
-Resource type: fs
-Instances: 1/1
-Agent: fs.sh
-Attributes:
-  name = mount1 [ primary ]
-  mountpoint = /mnt/cluster [ unique required ]
-  device = /dev/sdb8 [ unique required ]
-  fstype = ext3
-
-Resource type: script
-Agent: script.sh
-Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
-
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
-Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
-
-Resource type: nfsexport
-Agent: nfsexport.sh
-Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
-
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
-Attributes:
-  name = test1 [ primary unique required ]
-
 === Resource Tree ===
 service {
   name = "test1";
@@ -82,26 +97,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -109,9 +133,11 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test014.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test014.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,43 +1,38 @@
 === Resources List ===
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: script
+Agent: script.sh
 Attributes:
-  name = User group [ primary unique ]
-  target = @users [ required ]
-  path [ inherit("path") ]
-  options = ro
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
 Attributes:
-  name = Admin group [ primary unique ]
-  target = @admin [ required ]
-  path [ inherit("path") ]
-  options = rw
+  name = test1 [ primary unique required ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
 Attributes:
-  name = yellow [ primary unique ]
-  target = yellow [ required ]
-  path [ inherit("path") ]
-  options = rw,no_root_squash
+  name = test2 [ primary unique required ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
 Attributes:
-  name = magenta [ primary unique ]
-  target = magenta [ required ]
-  path [ inherit("path") ]
-  options = rw,no_root_squash
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
 Attributes:
-  name = red [ primary unique ]
-  target = red [ required ]
-  path [ inherit("path") ]
-  options = rw
+  address = 192.168.1.4 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
 Resource type: fs
 Instances: 1/1
@@ -47,6 +42,7 @@
   mountpoint = /mnt/cluster [ unique required ]
   device = /dev/sdb8 [ unique required ]
   fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 Resource type: fs
 Instances: 1/1
@@ -56,45 +52,66 @@
   mountpoint = /mnt/cluster2 [ unique required ]
   device = /dev/sdb9 [ unique required ]
   fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
-Resource type: script
-Agent: script.sh
+Resource type: nfsexport
+Agent: nfsexport.sh
 Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
+  name = User group [ primary unique ]
+  target = @users [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = ro
 
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  address = 192.168.1.4 [ primary unique ]
-  monitor_link = yes
+  name = Admin group [ primary unique ]
+  target = @admin [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw
 
-Resource type: nfsexport
-Agent: nfsexport.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
+  name = yellow [ primary unique ]
+  target = yellow [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw,no_root_squash
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  name = test1 [ primary unique required ]
+  name = magenta [ primary unique ]
+  target = magenta [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw,no_root_squash
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  name = test2 [ primary unique required ]
+  name = red [ primary unique ]
+  target = red [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw
 
 === Resource Tree ===
 service {
@@ -104,26 +121,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -131,10 +157,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 service {
@@ -144,26 +172,35 @@
     mountpoint = "/mnt/cluster2";
     device = "/dev/sdb9";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb9";
       path = "/mnt/cluster2";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "ro";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -171,9 +208,11 @@
   ip {
     address = "192.168.1.4";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test2";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test015.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test015.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,43 +1,38 @@
 === Resources List ===
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: script
+Agent: script.sh
 Attributes:
-  name = User group [ primary unique ]
-  target = @users [ required ]
-  path [ inherit("path") ]
-  options = rw,sync
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
 Attributes:
-  name = Admin group [ primary unique ]
-  target = @admin [ required ]
-  path [ inherit("path") ]
-  options = rw
+  name = test1 [ primary unique required ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
 Attributes:
-  name = yellow [ primary unique ]
-  target = yellow [ required ]
-  path [ inherit("path") ]
-  options = rw,no_root_squash
+  name = test2 [ primary unique required ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
 Attributes:
-  name = magenta [ primary unique ]
-  target = magenta [ required ]
-  path [ inherit("path") ]
-  options = rw,no_root_squash
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
 Attributes:
-  name = red [ primary unique ]
-  target = red [ required ]
-  path [ inherit("path") ]
-  options = rw
+  address = 192.168.1.4 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
 Resource type: fs
 Instances: 1/1
@@ -47,6 +42,7 @@
   mountpoint = /mnt/cluster [ unique required ]
   device = /dev/sdb8 [ unique required ]
   fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 Resource type: fs
 Instances: 1/1
@@ -56,45 +52,66 @@
   mountpoint = /mnt/cluster2 [ unique required ]
   device = /dev/sdb9 [ unique required ]
   fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
-Resource type: script
-Agent: script.sh
+Resource type: nfsexport
+Agent: nfsexport.sh
 Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
+  name = User group [ primary unique ]
+  target = @users [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw,sync
 
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  address = 192.168.1.4 [ primary unique ]
-  monitor_link = yes
+  name = Admin group [ primary unique ]
+  target = @admin [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw
 
-Resource type: nfsexport
-Agent: nfsexport.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
+  name = yellow [ primary unique ]
+  target = yellow [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw,no_root_squash
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  name = test1 [ primary unique required ]
+  name = magenta [ primary unique ]
+  target = magenta [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw,no_root_squash
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  name = test2 [ primary unique required ]
+  name = red [ primary unique ]
+  target = red [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw
 
 === Resource Tree ===
 service {
@@ -104,26 +121,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw,sync";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -131,10 +157,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 service {
@@ -144,26 +172,35 @@
     mountpoint = "/mnt/cluster2";
     device = "/dev/sdb9";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb9";
       path = "/mnt/cluster2";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw,sync";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -171,9 +208,11 @@
   ip {
     address = "192.168.1.4";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test2";
   }
 }
--- cluster/rgmanager/src/daemons/tests/test016.expected	2005/03/21 22:01:31	1.1.2.2
+++ cluster/rgmanager/src/daemons/tests/test016.expected	2007/03/20 19:44:25	1.1.2.2.6.1
@@ -1,44 +1,39 @@
 Warning: Max references exceeded for resource address (type ip)
 === Resources List ===
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: script
+Agent: script.sh
 Attributes:
-  name = User group [ primary unique ]
-  target = @users [ required ]
-  path [ inherit("path") ]
-  options = rw,sync
+  name = initscript [ primary unique ]
+  file = /etc/init.d/sshd [ unique required ]
+  service_name [ inherit("service%name") ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
 Attributes:
-  name = Admin group [ primary unique ]
-  target = @admin [ required ]
-  path [ inherit("path") ]
-  options = rw
+  name = test1 [ primary unique required ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: service [ROOT]
+Instances: 1/1
+Agent: service.sh
 Attributes:
-  name = yellow [ primary unique ]
-  target = yellow [ required ]
-  path [ inherit("path") ]
-  options = rw,no_root_squash
+  name = test2 [ primary unique required ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
 Attributes:
-  name = magenta [ primary unique ]
-  target = magenta [ required ]
-  path [ inherit("path") ]
-  options = rw,no_root_squash
+  address = 192.168.1.3 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
-Resource type: nfsclient
-Agent: nfsclient.sh
+Resource type: ip
+Instances: 1/1
+Agent: ip.sh
 Attributes:
-  name = red [ primary unique ]
-  target = red [ required ]
-  path [ inherit("path") ]
-  options = rw
+  address = 192.168.1.4 [ primary unique ]
+  monitor_link = yes
+  nfslock [ inherit("service%nfslock") ]
 
 Resource type: fs
 Instances: 1/1
@@ -48,6 +43,7 @@
   mountpoint = /mnt/cluster [ unique required ]
   device = /dev/sdb8 [ unique required ]
   fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
 Resource type: fs
 Instances: 1/1
@@ -57,45 +53,66 @@
   mountpoint = /mnt/cluster2 [ unique required ]
   device = /dev/sdb9 [ unique required ]
   fstype = ext3
+  nfslock [ inherit("nfslock") ]
 
-Resource type: script
-Agent: script.sh
+Resource type: nfsexport
+Agent: nfsexport.sh
 Attributes:
-  name = initscript [ primary unique ]
-  file = /etc/init.d/sshd [ unique required ]
+  name = Dummy Export [ primary ]
+  device [ inherit("device") ]
+  path [ inherit("mountpoint") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfslock") ]
 
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  address = 192.168.1.3 [ primary unique ]
-  monitor_link = yes
+  name = User group [ primary unique ]
+  target = @users [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw,sync
 
-Resource type: ip
-Instances: 1/1
-Agent: ip.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  address = 192.168.1.4 [ primary unique ]
-  monitor_link = yes
+  name = Admin group [ primary unique ]
+  target = @admin [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw
 
-Resource type: nfsexport
-Agent: nfsexport.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  name = Dummy Export [ primary ]
-  device [ inherit("device") ]
-  path [ inherit("mountpoint") ]
+  name = yellow [ primary unique ]
+  target = yellow [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw,no_root_squash
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  name = test1 [ primary unique required ]
+  name = magenta [ primary unique ]
+  target = magenta [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw,no_root_squash
 
-Resource type: service [ROOT]
-Instances: 1/1
-Agent: service.sh
+Resource type: nfsclient
+Agent: nfsclient.sh
 Attributes:
-  name = test2 [ primary unique required ]
+  name = red [ primary unique ]
+  target = red [ required ]
+  path [ inherit("path") ]
+  fsid [ inherit("fsid") ]
+  nfslock [ inherit("nfsexport%nfslock") ]
+  options = rw
 
 === Resource Tree ===
 service {
@@ -105,26 +122,35 @@
     mountpoint = "/mnt/cluster";
     device = "/dev/sdb8";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb8";
       path = "/mnt/cluster";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw,sync";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -132,10 +158,12 @@
   ip {
     address = "192.168.1.3";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test1";
   }
 }
 service {
@@ -145,26 +173,35 @@
     mountpoint = "/mnt/cluster2";
     device = "/dev/sdb9";
     fstype = "ext3";
+    nfslock = "(null)";
     nfsexport {
       name = "Dummy Export";
       device = "/dev/sdb9";
       path = "/mnt/cluster2";
+      fsid = "(null)";
+      nfslock = "(null)";
       nfsclient {
         name = "Admin group";
         target = "@admin";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
       nfsclient {
         name = "User group";
         target = "@users";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw,sync";
       }
       nfsclient {
         name = "red";
         target = "red";
         path = "/mnt/cluster2";
+        fsid = "(null)";
+        nfslock = "(null)";
         options = "rw";
       }
     }
@@ -172,9 +209,11 @@
   ip {
     address = "192.168.1.4";
     monitor_link = "yes";
+    nfslock = "(null)";
   }
   script {
     name = "initscript";
     file = "/etc/init.d/sshd";
+    service_name = "test2";
   }
 }
--- cluster/rgmanager/src/resources/lvm.sh	2007/02/15 22:48:28	1.1.4.1
+++ cluster/rgmanager/src/resources/lvm.sh	2007/03/20 19:44:25	1.1.4.2
@@ -163,7 +163,7 @@
 	#
 	# Check if device is active
 	#
-	if [[ ! $(lvs -o attr --noheadings vg/mirror) =~ ....a. ]]; then
+	if [[ ! $(lvs -o attr --noheadings $lv_path) =~ ....a. ]]; then
 	    return $OCF_ERR_GENERIC
 	fi
 
--- cluster/rgmanager/src/resources/ocf-shellfuncs	2007/02/14 16:23:06	1.2.2.6
+++ cluster/rgmanager/src/resources/ocf-shellfuncs	2007/03/20 19:44:25	1.2.2.7
@@ -1,5 +1,5 @@
 #
-# 	$Id: ocf-shellfuncs,v 1.2.2.6 2007/02/14 16:23:06 lhh Exp $
+# 	$Id: ocf-shellfuncs,v 1.2.2.7 2007/03/20 19:44:25 lhh Exp $
 #
 # 	Common helper functions for the OCF Resource Agents supplied by
 # 	heartbeat.




More information about the Cluster-devel mailing list