[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/rgmanager ChangeLog src/daemons/main.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh sourceware org	2006-08-21 15:14:09

Modified files:
	rgmanager      : ChangeLog 
	rgmanager/src/daemons: main.c 

Log message:
	2006-08-21 Lon Hohberger <lhh at redhat.com>
	* src/daemons/main.c: Fix #202500 - simultaneous starts confuse
	rgmanager.  This happened due to the fact that rgmanager was not
	correctly determining port listening status of other nodes on the
	first pass, and subsequent attempts to determine status of other
	nodes were not tried.

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

--- cluster/rgmanager/ChangeLog	2006/08/18 20:33:24	1.21
+++ cluster/rgmanager/ChangeLog	2006/08/21 15:14:08	1.22
@@ -1,3 +1,10 @@
+2006-08-21 Lon Hohberger <lhh at redhat.com>
+	* src/daemons/main.c: Fix #202500 - simultaneous starts confuse
+	rgmanager.  This happened due to the fact that rgmanager was not
+	correctly determining port listening status of other nodes on the
+	first pass, and subsequent attempts to determine status of other 
+	nodes were not tried.
+
 2006-08-18 Lon Hohberger <lhh at redhat.com>
 	* include/resgroup.h: Change ordering and add magic field to
 	rgmanager state field (warning: breaks compatibility from 08/08 CVS!)
--- cluster/rgmanager/src/daemons/main.c	2006/08/18 15:26:22	1.29
+++ cluster/rgmanager/src/daemons/main.c	2006/08/21 15:14:09	1.30
@@ -144,6 +144,10 @@
 		if (new_ml->cml_members[x].cn_nodeid == my_id())
 			continue;
 
+#ifdef DEBUG
+		printf("Checking for listening status of %d\n", new_ml->cml_members[x].cn_nodeid);
+#endif
+
 		do {
 			quorate = cman_is_listening(h,
 					new_ml->cml_members[x].cn_nodeid,
@@ -152,21 +156,18 @@
 				clulog(LOG_DEBUG, "Node %d is not listening\n",
 					new_ml->cml_members[x].cn_nodeid);
 				new_ml->cml_members[x].cn_member = 0;
-			} else if (quorate == -1 && errno == EBUSY) {
+			} else if (quorate < 0) {
+				perror("cman_is_listening");
 				usleep(50000);
 				continue;
 			}
 
-			if (quorate < 0) {
-				perror("cman_is_listening");
-			}
-
-			if (quorate > 0) {
-				printf("Node %d IS listening\n",
-				       new_ml->cml_members[x].cn_nodeid);
-			}
-
-		} while(0);
+#ifdef DEBUG
+			printf("Node %d IS listening\n",
+			       new_ml->cml_members[x].cn_nodeid);
+#endif
+			break;
+		} while(1);
 	}
 
 	cman_finish(h);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]