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

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2006-11-27 22:21:30

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

Log message:
	Fix #192117 - patch ported to RHEL4 from head by Lenny Maiorani

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

--- cluster/rgmanager/src/daemons/groups.c	2006/06/16 19:57:52	1.8.2.17
+++ cluster/rgmanager/src/daemons/groups.c	2006/11/27 22:21:30	1.8.2.18
@@ -879,8 +879,19 @@
 		if (curr->rn_resource->r_flags & RF_NEEDSTART)
 			need_init = 1;
 
-		if (get_rg_state_local(name, &svcblk) < 0) {
-			continue;
+		if (!need_init) {
+			if (get_rg_state_local(name, &svcblk) < 0)
+				continue;
+		} else {
+			if (rg_lock(name, &lockp) != 0)
+				continue;
+
+			if (get_rg_state(name, &svcblk) < 0) {
+				rg_unlock(name, lockp);
+				continue;
+			}
+
+			rg_unlock(name, lockp);
 		}
 
 		if (!need_init && svcblk.rs_owner != my_id()) {



^ permalink raw reply	[flat|nested] 4+ messages in thread
* [Cluster-devel] cluster/rgmanager/src/daemons groups.c
@ 2008-02-01 15:28 lhh
  0 siblings, 0 replies; 4+ messages in thread
From: lhh @ 2008-02-01 15:28 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2008-02-01 15:28:52

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

Log message:
	Fix erroneous commit to groups.c

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

--- cluster/rgmanager/src/daemons/groups.c	2008/02/01 15:15:02	1.25.2.15
+++ cluster/rgmanager/src/daemons/groups.c	2008/02/01 15:28:52	1.25.2.16
@@ -1812,7 +1812,6 @@
 	pthread_rwlock_rdlock(&resource_lock);
 	node = node_by_ref(&_tree, rg_name);
 	if (node) {
-		printf("%s %p\n", rg_name, node->rn_restart_counter);
 		ret = restart_threshold_exceeded(node->rn_restart_counter);
 	}
 	pthread_rwlock_unlock(&resource_lock);



^ permalink raw reply	[flat|nested] 4+ messages in thread
* [Cluster-devel] cluster/rgmanager/src/daemons groups.c
@ 2007-02-21 20:46 lhh
  0 siblings, 0 replies; 4+ messages in thread
From: lhh @ 2007-02-21 20:46 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2007-02-21 20:46:50

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

Log message:
	Resolves: 222445
	* Only allow one status check thread to spawn at a time

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

--- cluster/rgmanager/src/daemons/groups.c	2006/12/18 21:48:48	1.25.2.1
+++ cluster/rgmanager/src/daemons/groups.c	2007/02/21 20:46:49	1.25.2.2
@@ -44,6 +44,7 @@
 static fod_t *_domains = NULL;
 
 pthread_mutex_t config_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t status_mutex = PTHREAD_MUTEX_INITIALIZER;
 pthread_rwlock_t resource_lock = PTHREAD_RWLOCK_INITIALIZER;
 
 void res_build_name(char *, size_t, resource_t *);
@@ -991,6 +992,10 @@
 	resource_node_t *curr;
 	rg_state_t svcblk;
 	char rg[64];
+	
+	/* Only one status thread at a time, please! */
+	if (pthread_mutex_trylock(&status_mutex) != 0)
+		return NULL;
 
 	pthread_rwlock_rdlock(&resource_lock);
 	list_do(&_tree, curr) {
@@ -1013,6 +1018,7 @@
 	} while (!list_done(&_tree, curr));
 
 	pthread_rwlock_unlock(&resource_lock);
+	pthread_mutex_unlock(&status_mutex);
 
 	return NULL;
 }



^ permalink raw reply	[flat|nested] 4+ messages in thread
* [Cluster-devel] cluster/rgmanager/src/daemons groups.c
@ 2006-06-12 18:40 lhh
  0 siblings, 0 replies; 4+ messages in thread
From: lhh @ 2006-06-12 18:40 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2006-06-12 18:40:17

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

Log message:
	Log debug messages at DEBUG level (not INFO)

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

--- cluster/rgmanager/src/daemons/groups.c	2006/05/26 15:32:00	1.8.2.15
+++ cluster/rgmanager/src/daemons/groups.c	2006/06/12 18:40:11	1.8.2.16
@@ -287,7 +287,7 @@
 	exclusive = val && ((!strcmp(val, "yes") || (atoi(val)>0)));
 
 	if (exclusive && mp->cm_svccount) {
-		clulog(LOG_INFO,
+		clulog(LOG_DEBUG,
 		       "Skipping RG %s: Exclusive and I am running services\n",
 		       svcName);
 		return;
@@ -298,7 +298,7 @@
 	   service.
 	 */
 	if (mp->cm_svcexcl) {
-		clulog(LOG_INFO,
+		clulog(LOG_DEBUG,
 		       "Skipping RG %s: I am running an exclusive service\n",
 		       svcName);
 		return;
@@ -461,7 +461,7 @@
 	pthread_rwlock_unlock(&resource_lock);
 	cml_free(membership);
 
-	clulog(LOG_INFO, "Event (%d:%d:%d) Processed\n", local,
+	clulog(LOG_DEBUG, "Event (%d:%d:%d) Processed\n", local,
 	       (int)nodeid, nodeStatus);
 
 	return 0;



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

end of thread, other threads:[~2008-02-01 15:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-27 22:21 [Cluster-devel] cluster/rgmanager/src/daemons groups.c lhh
  -- strict thread matches above, loose matches on Subject: below --
2008-02-01 15:28 lhh
2007-02-21 20:46 lhh
2006-06-12 18:40 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).