cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2006-08-11 15:06 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2006-08-11 15:06 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2006-08-11 15:06:27

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Apply Navid's patch to -head

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&r1=1.21&r2=1.22

--- cluster/rgmanager/src/daemons/restree.c	2006/07/19 18:43:32	1.21
+++ cluster/rgmanager/src/daemons/restree.c	2006/08/11 15:06:27	1.22
@@ -15,6 +15,9 @@
   along with this program; see the file COPYING.  If not, write to the
   Free Software Foundation, Inc.,  675 Mass Ave, Cambridge, 
   MA 02139, USA.
+
+  Fix for #193859 - relocation of a service w/o umounting file-systems
+    by Navid Sheikhol-Eslami [ navid at redhat dot com ]
 */
 #include <libxml/parser.h>
 #include <libxml/xmlmemory.h>
@@ -702,18 +705,18 @@
 #endif
 
 			/* Do op on all children at our level */
-			rv = _res_op(&node->rn_child, first,
+			rv += _res_op(&node->rn_child, first,
 			     	     rule->rr_childtypes[x].rc_name, 
 		     		     ret, op);
-			if (rv != 0)
+			if (rv != 0 && op != RS_STOP)
 				return rv;
 		}
 
-		if (rv != 0)
+		if (rv != 0 && op != RS_STOP)
 			return rv;
 	}
 
-	return 0;
+	return rv;
 }
 
 



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2006-08-16 14:55 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2006-08-16 14:55 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	STABLE
Changes by:	lhh at sourceware.org	2006-08-16 14:55:40

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Sync with RHEL4 branch

Patches:
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.7&r2=1.10.2.2.6.8

--- cluster/rgmanager/src/daemons/restree.c	2006/06/16 20:11:51	1.10.2.2.6.7
+++ cluster/rgmanager/src/daemons/restree.c	2006/08/16 14:55:40	1.10.2.2.6.8
@@ -15,6 +15,9 @@
   along with this program; see the file COPYING.  If not, write to the
   Free Software Foundation, Inc.,  675 Mass Ave, Cambridge, 
   MA 02139, USA.
+
+  Fix for #193859 - relocation of a service w/o umounting file-systems
+    by Navid Sheikhol-Eslami [ navid at redhat dot com ]
 */
 #include <libxml/parser.h>
 #include <libxml/xmlmemory.h>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2006-09-21 18:03 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2006-09-21 18:03 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2006-09-21 18:03:30

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Apply resource-instance-name.patch

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.10.2.11&r2=1.10.2.12

--- cluster/rgmanager/src/daemons/restree.c	2006/08/11 15:02:29	1.10.2.11
+++ cluster/rgmanager/src/daemons/restree.c	2006/09/21 18:03:30	1.10.2.12
@@ -181,11 +181,13 @@
 	   Store the OCF Resource Instance (primary attr)
 	 */
 	n = strlen(OCF_RESOURCE_INSTANCE_STR) +
+		strlen(res->r_rule->rr_type) + 1 +
 		strlen(res->r_attrs[0].ra_value) + 2;
 	val = malloc(n);
 	if (!val)
 		return;
-	snprintf(val, n, "%s=%s", OCF_RESOURCE_INSTANCE_STR,
+	snprintf(val, n, "%s=%s:%s", OCF_RESOURCE_INSTANCE_STR,
+		 res->r_rule->rr_type,
 		 res->r_attrs[0].ra_value);
 	*env = val; env++;
 



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2006-09-21 18:04 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2006-09-21 18:04 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2006-09-21 18:04:04

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Apply resource-instance-name.patch

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&r1=1.22&r2=1.23

--- cluster/rgmanager/src/daemons/restree.c	2006/08/11 15:06:27	1.22
+++ cluster/rgmanager/src/daemons/restree.c	2006/09/21 18:04:04	1.23
@@ -182,11 +182,13 @@
 	   Store the OCF Resource Instance (primary attr)
 	 */
 	n = strlen(OCF_RESOURCE_INSTANCE_STR) +
+		strlen(res->r_rule->rr_type) + 1 +
 		strlen(res->r_attrs[0].ra_value) + 2;
 	val = malloc(n);
 	if (!val)
 		return;
-	snprintf(val, n, "%s=%s", OCF_RESOURCE_INSTANCE_STR,
+	snprintf(val, n, "%s=%s:%s", OCF_RESOURCE_INSTANCE_STR,
+		 res->r_rule->rr_type,
 		 res->r_attrs[0].ra_value);
 	*env = val; env++;
 



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-02-22 16:37 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-02-22 16:37 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2007-02-22 16:37:28

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Make status checks happen at 'start' time (parent-before-child) instead of 'stop' time (parent-after-child).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&r1=1.24&r2=1.25

--- cluster/rgmanager/src/daemons/restree.c	2007/01/26 21:42:30	1.24
+++ cluster/rgmanager/src/daemons/restree.c	2007/02/22 16:37:28	1.25
@@ -1027,15 +1027,21 @@
 				++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/status/etc stops after children have stopped */
+		/* Stop should occur after children have stopped */
 		if (me && (op == RS_STOP)) {
 			node->rn_flags &= ~RF_NEEDSTOP;
 			rv = res_exec(node, res_ops[op], NULL, 0);
@@ -1049,12 +1055,6 @@
 				--node->rn_resource->r_incarnations;
 				node->rn_state = RES_STOPPED;
 			}
-
-		} else if (me && (op == RS_STATUS)) {
-
-			rv = do_status(node);
-			if (rv != 0)
-				return rv;
 		}
 
 		/*



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-03-22 23:23 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-03-22 23:23 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL45
Changes by:	lhh at sourceware.org	2007-03-22 23:23:17

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Fix 212121, pass 4

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=RHEL45&r1=1.10.2.14&r2=1.10.2.14.2.1

--- cluster/rgmanager/src/daemons/restree.c	2007/03/20 19:40:06	1.10.2.14
+++ cluster/rgmanager/src/daemons/restree.c	2007/03/22 23:23:17	1.10.2.14.2.1
@@ -46,6 +46,9 @@
 int _res_op(resource_node_t **tree, resource_t *first, char *type,
 	    void * __attribute__((unused))ret, int op);
 void print_env(char **env);
+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);
 
 /* XXX from reslist.c */
 void * act_dup(resource_act_t *acts);
@@ -947,8 +950,8 @@
 
 
 static inline int
-_xx_child_internal(resource_node_t *node, resource_node_t *child, void *ret,
-		   int op)
+_xx_child_internal(resource_node_t *node, resource_t *first,
+		   resource_node_t *child, void *ret, int op)
 {
 	int x;
 	resource_rule_t *rule = node->rn_resource->r_rule;
@@ -964,7 +967,7 @@
 		}
 	}
 
-	return _res_op_internal(&child, child->rn_resource,
+	return _res_op_internal(&child, first,
 	 		       child->rn_resource->r_rule->rr_type,
 			       ret, op, child);
 }
@@ -979,13 +982,13 @@
 
 	if (op == RS_START || op == RS_STATUS) {
 		list_for(&node->rn_child, child, y) {
-			rv = _xx_child_internal(node, child, ret, op);
+			rv = _xx_child_internal(node, first, child, ret, op);
 			if (rv)
 				return rv;
 		}
 	} else {
 		list_for_rev(&node->rn_child, child, y) {
-			rv += _xx_child_internal(node, child, ret, op);
+			rv += _xx_child_internal(node, first, child, ret, op);
 		}
 	}
 



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-03-22 23:24 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-03-22 23:24 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	STABLE
Changes by:	lhh at sourceware.org	2007-03-22 23:24:06

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Fix 212121, pass 4

Patches:
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.10&r2=1.10.2.2.6.11

--- cluster/rgmanager/src/daemons/restree.c	2007/03/20 19:44:25	1.10.2.2.6.10
+++ cluster/rgmanager/src/daemons/restree.c	2007/03/22 23:24:06	1.10.2.2.6.11
@@ -46,6 +46,9 @@
 int _res_op(resource_node_t **tree, resource_t *first, char *type,
 	    void * __attribute__((unused))ret, int op);
 void print_env(char **env);
+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);
 
 /* XXX from reslist.c */
 void * act_dup(resource_act_t *acts);
@@ -947,8 +950,8 @@
 
 
 static inline int
-_xx_child_internal(resource_node_t *node, resource_node_t *child, void *ret,
-		   int op)
+_xx_child_internal(resource_node_t *node, resource_t *first,
+		   resource_node_t *child, void *ret, int op)
 {
 	int x;
 	resource_rule_t *rule = node->rn_resource->r_rule;
@@ -964,7 +967,7 @@
 		}
 	}
 
-	return _res_op_internal(&child, child->rn_resource,
+	return _res_op_internal(&child, first,
 	 		       child->rn_resource->r_rule->rr_type,
 			       ret, op, child);
 }
@@ -979,13 +982,13 @@
 
 	if (op == RS_START || op == RS_STATUS) {
 		list_for(&node->rn_child, child, y) {
-			rv = _xx_child_internal(node, child, ret, op);
+			rv = _xx_child_internal(node, first, child, ret, op);
 			if (rv)
 				return rv;
 		}
 	} else {
 		list_for_rev(&node->rn_child, child, y) {
-			rv += _xx_child_internal(node, child, ret, op);
+			rv += _xx_child_internal(node, first, child, ret, op);
 		}
 	}
 



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-03-23  0:00 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-03-23  0:00 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2007-03-23 00:00:07

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Remove dead code; fix build_tree loop

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&r1=1.27&r2=1.28

--- cluster/rgmanager/src/daemons/restree.c	2007/03/22 23:46:58	1.27
+++ cluster/rgmanager/src/daemons/restree.c	2007/03/23 00:00:07	1.28
@@ -728,18 +728,13 @@
 		    resource_rule_t **rulelist,
 		    resource_t **reslist)
 {
-	resource_rule_t *curr;
 	resource_node_t *root = NULL;
 	char tok[512];
 
 	snprintf(tok, sizeof(tok), "%s", RESOURCE_TREE_ROOT);
 
 	/* Find and build the list of root nodes */
-	list_do(rulelist, curr) {
-
-		build_tree(ccsfd, &root, NULL, NULL/*curr*/, rulelist, reslist, tok);
-
-	} while (!list_done(rulelist, curr));
+	build_tree(ccsfd, &root, NULL, NULL/*curr*/, rulelist, reslist, tok);
 
 	if (root)
 		*tree = root;
@@ -1139,132 +1134,9 @@
    @param realop	Operation to perform if either first is found,
    			or no first is declared (in which case, all nodes
 			in the subtree).
+   @param node		Node we're operating on
    @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)
-{
-	int rv, me;
-	resource_node_t *node;
-	int op;
-
-	list_do(tree, node) {
-
-		/* 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))
-			continue;
-
-		/* 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", agent_op_str(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, agent_op_str(op), NULL, 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, agent_op_str(op), NULL, 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", agent_op_str(op),
-		       node->rn_resource->r_rule->rr_type,
-		       primary_attr_value(node->rn_resource));
-		 */
-	} while (!list_done(tree, node));
-
-	return 0;
-}
-#endif
-
-
 static inline int
 _res_op_internal(resource_node_t **tree, resource_t *first,
 		 char *type, void *__attribute__((unused))ret, int realop,



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-05-02 22:40 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-05-02 22:40 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL45
Changes by:	lhh at sourceware.org	2007-05-02 22:40:43

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Fix 212121 part 5

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=RHEL45&r1=1.10.2.14.2.1&r2=1.10.2.14.2.2

--- cluster/rgmanager/src/daemons/restree.c	2007/03/22 23:23:17	1.10.2.14.2.1
+++ cluster/rgmanager/src/daemons/restree.c	2007/05/02 22:40:42	1.10.2.14.2.2
@@ -582,7 +582,6 @@
 	resource_rule_t *childrule;
 	resource_node_t *node;
 	char *ref;
-	char *newchild;
 	char *tmp;
 	int ccount = 0, x = 0, y = 0, flags = 0;
 
@@ -712,14 +711,6 @@
 			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;



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-05-02 22:54 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-05-02 22:54 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2007-05-02 22:54:28

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Fix 212121, part 5

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.10.2.15&r2=1.10.2.16

--- cluster/rgmanager/src/daemons/restree.c	2007/03/22 23:15:58	1.10.2.15
+++ cluster/rgmanager/src/daemons/restree.c	2007/05/02 22:54:28	1.10.2.16
@@ -582,7 +582,6 @@
 	resource_rule_t *childrule;
 	resource_node_t *node;
 	char *ref;
-	char *newchild;
 	char *tmp;
 	int ccount = 0, x = 0, y = 0, flags = 0;
 
@@ -712,14 +711,6 @@
 			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;



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-05-02 22:58 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-05-02 22:58 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	STABLE
Changes by:	lhh at sourceware.org	2007-05-02 22:58:35

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Fix 212121, part 5

Patches:
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.11&r2=1.10.2.2.6.12

--- cluster/rgmanager/src/daemons/restree.c	2007/03/22 23:24:06	1.10.2.2.6.11
+++ cluster/rgmanager/src/daemons/restree.c	2007/05/02 22:58:35	1.10.2.2.6.12
@@ -582,7 +582,6 @@
 	resource_rule_t *childrule;
 	resource_node_t *node;
 	char *ref;
-	char *newchild;
 	char *tmp;
 	int ccount = 0, x = 0, y = 0, flags = 0;
 
@@ -712,14 +711,6 @@
 			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;



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-05-03 15:14 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-05-03 15:14 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2007-05-03 15:14:16

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Fix corner case reported in #212121

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.23.2.2&r2=1.23.2.3

--- cluster/rgmanager/src/daemons/restree.c	2007/03/23 00:06:34	1.23.2.2
+++ cluster/rgmanager/src/daemons/restree.c	2007/05/03 15:14:16	1.23.2.3
@@ -543,7 +543,6 @@
 	resource_rule_t *childrule;
 	resource_node_t *node;
 	char *ref;
-	char *newchild;
 	char *tmp;
 	int ccount = 0, x = 0, y = 0, flags = 0;
 
@@ -672,15 +671,6 @@
 			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;



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-05-03 15:15 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-05-03 15:15 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2007-05-03 15:15:17

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Fix corner case reported in #212121

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&r1=1.29&r2=1.30

--- cluster/rgmanager/src/daemons/restree.c	2007/04/04 19:22:29	1.29
+++ cluster/rgmanager/src/daemons/restree.c	2007/05/03 15:15:17	1.30
@@ -543,7 +543,6 @@
 	resource_rule_t *childrule;
 	resource_node_t *node;
 	char *ref;
-	char *newchild;
 	char *tmp;
 	int ccount = 0, x = 0, y = 0, flags = 0;
 
@@ -672,15 +671,6 @@
 			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;



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-06-13 20:32 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-06-13 20:32 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2007-06-13 20:32:03

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Fix status check

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.23.2.5&r2=1.23.2.6

--- cluster/rgmanager/src/daemons/restree.c	2007/06/13 20:12:19	1.23.2.5
+++ cluster/rgmanager/src/daemons/restree.c	2007/06/13 20:32:02	1.23.2.6
@@ -523,7 +523,6 @@
 		free(ref);
 	}
 
-
 	curres->r_refs++;
 
 	*newnode = node;
@@ -1375,6 +1374,9 @@
 	int rv;
 	rv = _res_op(tree, res, NULL, ret, RS_STATUS);
 
+	if (rv == 0)
+		return 0;
+
 	if (rv & FL_FAILURE)
 		return rv;
 



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-06-13 20:32 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-06-13 20:32 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2007-06-13 20:32:41

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Fix status check

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&r1=1.32&r2=1.33

--- cluster/rgmanager/src/daemons/restree.c	2007/06/13 20:13:26	1.32
+++ cluster/rgmanager/src/daemons/restree.c	2007/06/13 20:32:41	1.33
@@ -1414,6 +1414,9 @@
 	int rv;
 	rv = _res_op(tree, res, NULL, ret, RS_STATUS);
 
+	if (rv == 0)
+		return 0;
+
 	if (rv & FL_FAILURE)
 		return rv;
 



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/daemons restree.c
@ 2007-09-28 15:36 lhh
  0 siblings, 0 replies; 16+ messages in thread
From: lhh @ 2007-09-28 15:36 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2007-09-28 15:36:52

Modified files:
	rgmanager/src/daemons: restree.c 

Log message:
	Clear checks out less than or equal to the level we just checked. #310981

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.10.2.17&r2=1.10.2.18

--- cluster/rgmanager/src/daemons/restree.c	2007/09/28 15:14:52	1.10.2.17
+++ cluster/rgmanager/src/daemons/restree.c	2007/09/28 15:36:52	1.10.2.18
@@ -1097,11 +1097,19 @@
 	node->rn_last_depth = node->rn_actions[idx].ra_depth;
 	node->rn_checked = 1;
 
-	if (x == 0)
+	/* Clear check levels below ours. */
+	for (x=0; node->rn_actions[x].ra_name; x++) {
+		if (strcmp(node->rn_actions[x].ra_name, "status"))
+			continue;
+		if (node->rn_actions[x].ra_depth <= node->rn_last_depth)
+			node->rn_actions[x].ra_last = now;
+	}
+
+	if (node->rn_last_status == 0)
 		return 0;
 
 	if (!has_recover)
-		return x;
+		return node->rn_last_status;
 
 	/* Strange/failed status. Try to recover inline. */
 	if ((x = res_exec(node, RS_RECOVER, 0)) == 0)



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2007-09-28 15:36 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-03 15:14 [Cluster-devel] cluster/rgmanager/src/daemons restree.c lhh
  -- strict thread matches above, loose matches on Subject: below --
2007-09-28 15:36 lhh
2007-06-13 20:32 lhh
2007-06-13 20:32 lhh
2007-05-03 15:15 lhh
2007-05-02 22:58 lhh
2007-05-02 22:54 lhh
2007-05-02 22:40 lhh
2007-03-23  0:00 lhh
2007-03-22 23:24 lhh
2007-03-22 23:23 lhh
2007-02-22 16:37 lhh
2006-09-21 18:04 lhh
2006-09-21 18:03 lhh
2006-08-16 14:55 lhh
2006-08-11 15:06 lhh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).