Skip to contentSkip to conversation

cluster/cman/daemon commands.c

Cluster-devel [email protected] 1 participant 1 message Nov 6, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield at sourceware.org 2006-11-06 10:06:14

Modified files:
cman/daemon : commands.c

Log message:

	if an AISONLY node dies, mark it DEAD
	bz#213747 comments 9-13 (ish)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/daemon/commands.c.diff?cvsroot=cluster&r1=1.54&r2=1.55

cman/daemon/commands.c +14 -4
@@ -1961,13 +1961,18 @@
 	node->flags &= ~NODE_FLAGS_FENCEDWHILEUP;
 	node->flags |= NODE_FLAGS_BEENDOWN;
 
-	if (node->state == NODESTATE_MEMBER) {
+	switch (node->state) {
+	case NODESTATE_MEMBER:
 		node->state = NODESTATE_DEAD;
 		cluster_members--;
 		recalculate_quorum(0);
-		return;
-	}
-	if (node->state == NODESTATE_LEAVING) {
+		break;
+
+	case NODESTATE_AISONLY:
+		node->state = NODESTATE_DEAD;
+		break;
+
+	case NODESTATE_LEAVING:
 		node->state = NODESTATE_DEAD;
 		cluster_members--;
 
@@ -1975,6 +1980,11 @@
 			recalculate_quorum(1);
 		else
 			recalculate_quorum(0);
+		break;
+
+	case NODESTATE_JOINING:
+	case NODESTATE_DEAD:
+		break;
 	}
 }