Skip to contentSkip to conversation

cluster/rgmanager ChangeLog include/reslist.h ...

Cluster-devel [email protected] 1 participant 1 message May 31, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: lhh at sourceware.org 2007-05-31 18:58:46

Modified files:
rgmanager : ChangeLog
rgmanager/include: reslist.h rgmanager/src/daemons: groups.c resrules.c restree.c rgmanager/src/resources: script.sh

Log message:
Fix bugzilla #229650; implement __independent_subtree feature

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.31.2.9&r2=1.31.2.10
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/include/reslist.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.15.2.2&r2=1.15.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/groups.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.25.2.5&r2=1.25.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/resrules.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.16.2.4&r2=1.16.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.23.2.3&r2=1.23.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/script.sh.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.8&r2=1.8.2.1

rgmanager/ChangeLog +2 -0
@@ -1,6 +1,8 @@
 2007-05-31 Lon Hohberger <[email protected]>
 	* src/daemons/resrules.c: Fix #234249 - ignore obvious backup files
 	in /usr/share/cluster when processing resource rules
+	* src/daemons/restree.c, src/daemons/groups.c, include/reslist.h: 
+	Implement independent subtrees, per bug #229650
 
 2007-05-22 Lon Hohberger <[email protected]>
 	* src/resources/SAPInstance, SAPDatabase: Add primary attrs
rgmanager/include/reslist.h +5 -2
@@ -35,6 +35,8 @@
 #define RF_NEEDSTART	(1<<2)	/** Used when adding/changing resources */
 #define RF_NEEDSTOP	(1<<3)  /** Used when deleting/changing resources */
 #define RF_COMMON	(1<<4)	/** " */
+#define RF_INDEPENDENT	(1<<5)  /** Define this for a resource if it is
+				  otherwise an independent subtree */
 
 #define RES_STOPPED	(0)
 #define RES_STARTED	(1)
@@ -56,10 +58,10 @@
 
 
 typedef struct _resource_attribute {
-	int	ra_flags;
-	/* XXX possible alignment problem on ia64 */
 	char	*ra_name;
 	char	*ra_value;
+	int	ra_flags;
+	int	_pad_;
 } resource_attr_t;
 
 
@@ -78,6 +80,7 @@
 	time_t	ra_last;
 	time_t	ra_interval;
 	int	ra_depth;
+	int 	_pad_;
 } resource_act_t;
 
 
rgmanager/src/daemons/groups.c +2 -0
@@ -813,6 +813,7 @@
 	}
 	pthread_rwlock_unlock(&resource_lock);
 
+#if 0
 	/*
 	   Do NOT return error codes if we failed to stop for one of these
 	   reasons.  It didn't start, either, so it's safe to assume that
@@ -830,6 +831,7 @@
 			break;
 		}
 	}
+#endif
 
 	return ret;
 }
rgmanager/src/daemons/resrules.c +3 -1
@@ -262,6 +262,7 @@
 		acts[0].ra_depth = depth;
 		acts[0].ra_timeout = timeout;
 		acts[0].ra_interval = interval;
+		acts[0].ra_last = 0;
 		acts[1].ra_name = NULL;
 
 		*actsp = acts;
@@ -271,7 +272,7 @@
 	for (x = 0; acts[x].ra_name; x++) {
 		if (!strcmp(acts[x].ra_name, name) &&
 		    (depth == acts[x].ra_depth || depth == -1)) {
-			printf("Replacing action '%s' depth %d: ",
+			fprintf(stderr, "Replacing action '%s' depth %d: ",
 			       name, acts[x].ra_depth);
 			if (timeout >= 0) {
 				printf("timeout: %d->%d ",
@@ -306,6 +307,7 @@
 	acts[x].ra_depth = depth;
 	acts[x].ra_timeout = timeout;
 	acts[x].ra_interval = interval;
+	acts[x].ra_last = 0;
 
 	acts[x+1].ra_name = NULL;
 
rgmanager/src/daemons/restree.c +117 -187

413 lines not on this page · raw message

rgmanager/src/resources/script.sh +1 -1
@@ -115,5 +115,5 @@
 declare -i rv=$?
 if [ $rv -ne 0 ]; then
 	ocf_log err "script:$OCF_RESKEY_name: $1 of $OCF_RESKEY_file failed (returned $rv)"
-	return $OCF_ERR_GENERIC
+	exit $OCF_ERR_GENERIC
 fi