Skip to contentSkip to conversation

Fix rgmanager + qdisk behavior problems

PATCH In review Lon Hohberger 1 participant 2 messages Apr 16, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix rgmanager + qdisk behavior problems

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 :(

Signature · 52 lines
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;
#1 lore raw
Quoted 5 lines · Lon Hohberger

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

main.c +1 -0
diff -u -r1.34.2.2 main.c
@@ -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.