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

[Cluster-devel] cluster/group/daemon cpg.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2006-07-07 15:13:14

Modified files:
	group/daemon   : cpg.c 

Log message:
	complain and ignore a cpg confchg reason we don't understand

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/cpg.c.diff?cvsroot=cluster&r1=1.29&r2=1.30

--- cluster/group/daemon/cpg.c	2006/06/30 15:29:17	1.29
+++ cluster/group/daemon/cpg.c	2006/07/07 15:13:13	1.30
@@ -289,10 +289,19 @@
 		log_group(g, "confchg removed node %d reason %d",
 			  saved_left[i].nodeid, saved_left[i].reason);
 
-		if (saved_left[i].reason == CPG_REASON_LEAVE)
+		switch (saved_left[i].reason) {
+		case CPG_REASON_LEAVE:
 			process_node_leave(g, saved_left[i].nodeid);
-		else
+			break;
+		case CPG_REASON_NODEDOWN:
+		case CPG_REASON_PROCDOWN:
 			process_node_down(g, saved_left[i].nodeid);
+			break;
+		default:
+			log_error(g, "unknown leave reason %d node %d",
+				  saved_left[i].reason,
+				  saved_joined[i].nodeid);
+		}
 	}
 }
 
@@ -343,26 +352,14 @@
 	saved_name.length = group_name->length;
 	memcpy(&saved_name.value, &group_name->value, group_name->length);
 
-	/* fprintf(stderr, "CONFCHG LEFT: "); */
-	for (i = 0; i < left_list_entries; i++) {
+	for (i = 0; i < left_list_entries; i++)
 		saved_left[i] = left_list[i];
-		/* fprintf(stderr, "%d ", left_list[i].nodeid); */
-	}
-	/* fprintf(stderr, "\n"); */
 
-	/* fprintf(stderr, "CONFCHG JOIN: "); */
-	for (i = 0; i < joined_list_entries; i++) {
+	for (i = 0; i < joined_list_entries; i++)
 		saved_joined[i] = joined_list[i];
-		/* fprintf(stderr, "%d ", joined_list[i].nodeid); */
-	}
-	/* fprintf(stderr, "\n"); */
 
-	/* fprintf(stderr, "CONFCHG MEMB: "); */
-	for (i = 0; i < member_list_entries; i++) {
+	for (i = 0; i < member_list_entries; i++)
 		saved_member[i] = member_list[i];
-		/* fprintf(stderr, "%d ", member_list[i].nodeid); */
-	}
-	/* fprintf(stderr, "\n"); */
 
 	got_confchg = 1;
 }


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