Răsfoiți Sursa

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

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@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Christine Caulfield 11 ani în urmă
părinte
comite
c832ade034
1 a modificat fișierele cu 8 adăugiri și 0 ștergeri
  1. 8 0
      exec/votequorum.c

+ 8 - 0
exec/votequorum.c

@@ -1323,6 +1323,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