Skip to contentSkip to conversation

cluster/cman/cman_tool main.c

Cluster-devel [email protected] 1 participant 1 message Oct 9, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield at sourceware.org 2006-10-09 15:54:31

Modified files:
cman/cman_tool : main.c

Log message:
If there are disallowed (AISONLY) nodes in the cluster, then name & shame them.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/cman_tool/main.c.diff?cvsroot=cluster&r1=1.49&r2=1.50

cman/cman_tool/main.c +17 -0
@@ -270,6 +270,23 @@
 	}
 	printf("\n");
 
+	if (einfo->ei_flags & CMAN_EXTRA_FLAG_DISALLOWED) {
+		int count;
+		int numnodes;
+		cman_node_t *nodes;
+
+		count = cman_get_node_count(h);
+		nodes = malloc(sizeof(cman_node_t) * count);
+
+		if (cman_get_disallowed_nodes(h, count, &numnodes, nodes) == 0) {
+			printf("Disallowed nodes: ");
+			for (i=0; i<numnodes; i++) {
+				printf("%s ", nodes[i].cn_name);
+			}
+			printf("\n");
+		}
+	}
+
 }
 
 static int node_compare(const void *va, const void *vb)