Blame SOURCES/bz1205336-1-Votequorum-Fix-auto_tie_breaker-default.patch

f36a32
From 314a01c98e5f98ff686333966dbe675935b7b6a8 Mon Sep 17 00:00:00 2001
f36a32
From: Christine Caulfield <ccaulfie@redhat.com>
f36a32
Date: Mon, 2 Mar 2015 15:48:01 +0000
f36a32
Subject: [PATCH] Votequorum: Fix auto_tie_breaker default
f36a32
f36a32
The default for auto_tie_breaker should be 'lowest' - which is what it
f36a32
was before the extended ATB functionality of auto_tie_breaker_node was
f36a32
added, and what the documentation states.
f36a32
f36a32
However this was broken so that if auto_tie_breaker_node was not
f36a32
specified then auto_tie_breaker itself was ignored. This patch fixes
f36a32
that.
f36a32
f36a32
It also fixes a typo in a comment.
f36a32
f36a32
Signed-Off-By: Christine Caulfield <ccaulfie@redhat.com>
f36a32
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
f36a32
---
f36a32
 exec/votequorum.c |    9 +++++++--
f36a32
 1 files changed, 7 insertions(+), 2 deletions(-)
f36a32
f36a32
diff --git a/exec/votequorum.c b/exec/votequorum.c
f36a32
index 6caccaf..3757b53 100644
f36a32
--- a/exec/votequorum.c
f36a32
+++ b/exec/votequorum.c
f36a32
@@ -628,7 +628,7 @@ static int is_in_nodelist(int nodeid, unsigned int *members, int entries)
f36a32
 }
f36a32
 
f36a32
 /*
f36a32
- * The algorithm for a list of time-breaker nodes is:
f36a32
+ * The algorithm for a list of tie-breaker nodes is:
f36a32
  * travel the list of nodes in the auto_tie_breaker list,
f36a32
  * if the node IS in our current partition, check if the
f36a32
  * nodes earlier in the atb list are in the 'previous' partition;
f36a32
@@ -1290,7 +1290,12 @@ static char *votequorum_readconfig(int runtime)
f36a32
 		icmap_get_uint8("quorum.auto_tie_breaker", &atb;;
f36a32
 		icmap_get_string("quorum.auto_tie_breaker_node", &atb_string);
f36a32
 
f36a32
-		if (!atb) {
f36a32
+		/* auto_tie_breaker defaults to LOWEST */
f36a32
+		if (atb) {
f36a32
+		    auto_tie_breaker = ATB_LOWEST;
f36a32
+		    icmap_set_uint32("runtime.votequorum.atb_type", auto_tie_breaker);
f36a32
+		}
f36a32
+		else {
f36a32
 			auto_tie_breaker = ATB_NONE;
f36a32
 			if (atb_string) {
f36a32
 				log_printf(LOGSYS_LEVEL_WARNING,
f36a32
-- 
f36a32
1.7.1
f36a32