[PATCH] Don't allow both two_node and auto_tie_breaker in corosync.conf

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

 



The two_node and auto_tie_breaker options are incompatible as they
specify conflicting methods of determining the quorate half of a cluster
partition.

This patch detects this error in corosync.conf, issues a message and
disables two_node if auto_tie_breaker is present.

Signed-Off-By: Christine Caulfield <ccaulfie@xxxxxxxxxx>


diff --git a/exec/votequorum.c b/exec/votequorum.c
index 6caccaf..2f453b9 100644
--- a/exec/votequorum.c
+++ b/exec/votequorum.c
@@ -1318,6 +1318,14 @@ static char *votequorum_readconfig(int runtime)
 
 	}
 
+	/* two_node and auto_tie_breaker are not compatible as two_node uses
+	 *  a fence race to decide quorum whereas ATB decides based on node id
+	 */
+	if (two_node && auto_tie_breaker != ATB_NONE) {
+	        log_printf(LOGSYS_LEVEL_CRIT, "two_node and auto_tie_breaker are both specified but are not compatible");
+		log_printf(LOGSYS_LEVEL_CRIT, "two_node has been disabled, please fix your corosync.conf");
+		two_node = 0;
+	}
 	/*
 	 * quorum device is not compatible with last_man_standing and auto_tie_breaker
 	 * neither lms or atb can be set at runtime, so there is no need to check for
_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss

[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux