From c832ade034fa737561ccabefbe417c9d7855d970 Mon Sep 17 00:00:00 2001
From: Christine Caulfield <ccaulfie@redhat.com>
Date: Mon, 2 Mar 2015 15:50:21 +0000
Subject: [PATCH] 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>
---
exec/votequorum.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/exec/votequorum.c b/exec/votequorum.c
index 3757b53..2ff0b43 100644
--- a/exec/votequorum.c
+++ b/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
--
1.7.1