Blame SOURCES/bz1205338-1-Don-t-allow-both-two_node-and-auto_tie_breaker-in-co.patch

f36a32
From c832ade034fa737561ccabefbe417c9d7855d970 Mon Sep 17 00:00:00 2001
f36a32
From: Christine Caulfield <ccaulfie@redhat.com>
f36a32
Date: Mon, 2 Mar 2015 15:50:21 +0000
f36a32
Subject: [PATCH] Don't allow both two_node and auto_tie_breaker in corosync.conf
f36a32
f36a32
The two_node and auto_tie_breaker options are incompatible as they
f36a32
specify conflicting methods of determining the quorate half of a cluster
f36a32
partition.
f36a32
f36a32
This patch detects this error in corosync.conf, issues a message and
f36a32
disables two_node if auto_tie_breaker is present.
f36a32
f36a32
Signed-Off-By: Christine Caulfield <ccaulfie@redhat.com>
f36a32
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
f36a32
---
f36a32
 exec/votequorum.c |    8 ++++++++
f36a32
 1 files changed, 8 insertions(+), 0 deletions(-)
f36a32
f36a32
diff --git a/exec/votequorum.c b/exec/votequorum.c
f36a32
index 3757b53..2ff0b43 100644
f36a32
--- a/exec/votequorum.c
f36a32
+++ b/exec/votequorum.c
f36a32
@@ -1323,6 +1323,14 @@ static char *votequorum_readconfig(int runtime)
f36a32
 
f36a32
 	}
f36a32
 
f36a32
+	/* two_node and auto_tie_breaker are not compatible as two_node uses
f36a32
+	 * a fence race to decide quorum whereas ATB decides based on node id
f36a32
+	 */
f36a32
+	if (two_node && auto_tie_breaker != ATB_NONE) {
f36a32
+	        log_printf(LOGSYS_LEVEL_CRIT, "two_node and auto_tie_breaker are both specified but are not compatible.");
f36a32
+		log_printf(LOGSYS_LEVEL_CRIT, "two_node has been disabled, please fix your corosync.conf");
f36a32
+		two_node = 0;
f36a32
+	}
f36a32
 	/*
f36a32
 	 * quorum device is not compatible with last_man_standing and auto_tie_breaker
f36a32
 	 * neither lms or atb can be set at runtime, so there is no need to check for
f36a32
-- 
f36a32
1.7.1
f36a32