cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] Fix rgmanager + qdisk behavior problems
@ 2007-04-16 14:35 Lon Hohberger
  2007-04-16 14:42 ` [Cluster-devel] Re: [Linux-cluster] " Lon Hohberger
  0 siblings, 1 reply; 2+ messages in thread
From: Lon Hohberger @ 2007-04-16 14:35 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Thanks to Simone Gotti for pointing me at this.

Rgmanager thinks qdisk is a node (with node ID 0), so it tries to send
VF information to node 0 - which doesn't exist, causing rgmanger to not
work when qdisk is running :(

-- 
Lon Hohberger - Software Engineer - Red Hat, Inc.
-------------- next part --------------
Index: src/clulib/vft.c
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/clulib/vft.c,v
retrieving revision 1.17.2.1
diff -u -r1.17.2.1 vft.c
--- src/clulib/vft.c	28 Mar 2007 14:54:47 -0000	1.17.2.1
+++ src/clulib/vft.c	16 Apr 2007 14:31:05 -0000
@@ -1152,7 +1152,8 @@
 
 	remain = 0;
 	for (x = 0, y = 0; x < membership->cml_count; x++) {
-		if (membership->cml_members[x].cn_member) {
+		if (membership->cml_members[x].cn_nodeid &&
+		    membership->cml_members[x].cn_member) {
 			remain++;
 		}
 	}
Index: src/daemons/fo_domain.c
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/daemons/fo_domain.c,v
retrieving revision 1.11
diff -u -r1.11 fo_domain.c
--- src/daemons/fo_domain.c	27 Sep 2006 16:28:41 -0000	1.11
+++ src/daemons/fo_domain.c	16 Apr 2007 14:31:05 -0000
@@ -340,6 +340,10 @@
 
 	ENTER();
 
+	if (nodeid <= 0) {
+		RETURN(FOD_ILLEGAL);
+	}
+
 	/*
 	 * Um, if the node isn't online...
 	 */
Index: src/daemons/groups.c
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/daemons/groups.c,v
retrieving revision 1.25.2.3
diff -u -r1.25.2.3 groups.c
--- src/daemons/groups.c	20 Mar 2007 17:09:11 -0000	1.25.2.3
+++ src/daemons/groups.c	16 Apr 2007 14:31:05 -0000
@@ -164,6 +164,8 @@
 		pthread_rwlock_unlock(&resource_lock);
 
 	for (x=0; x < allowed->cml_count; x++) {
+		if (allowed->cml_members[x].cn_nodeid == 0)
+			continue;
 		if (!allowed->cml_members[x].cn_member)
 			continue;
 

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

* [Cluster-devel] Re: [Linux-cluster] [PATCH] Fix rgmanager + qdisk behavior problems
  2007-04-16 14:35 [Cluster-devel] [PATCH] Fix rgmanager + qdisk behavior problems Lon Hohberger
@ 2007-04-16 14:42 ` Lon Hohberger
  0 siblings, 0 replies; 2+ messages in thread
From: Lon Hohberger @ 2007-04-16 14:42 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On Mon, Apr 16, 2007 at 10:35:20AM -0400, Lon Hohberger wrote:
> Thanks to Simone Gotti for pointing me at this.
> 
> Rgmanager thinks qdisk is a node (with node ID 0), so it tries to send
> VF information to node 0 - which doesn't exist, causing rgmanger to not
> work when qdisk is running :(

one-liner which eliminates the problem in one shot: mark qdisk as 'down'
so rgmanager doesn't try to talk to it.




-------------- next part --------------
Index: main.c
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/daemons/main.c,v
retrieving revision 1.34.2.2
diff -u -r1.34.2.2 main.c
--- main.c	12 Apr 2007 17:23:05 -0000	1.34.2.2
+++ main.c	16 Apr 2007 14:41:54 -0000
@@ -199,6 +199,7 @@
 
 	cman_finish(h);
 	member_list_update(new_ml);
+	member_set_state(0, 0);		/* Mark qdisk as dead */
 
 	/*
 	 * Handle nodes lost.  Do our local node event first.

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

end of thread, other threads:[~2007-04-16 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-16 14:35 [Cluster-devel] [PATCH] Fix rgmanager + qdisk behavior problems Lon Hohberger
2007-04-16 14:42 ` [Cluster-devel] Re: [Linux-cluster] " Lon Hohberger

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).