cluster: RHEL6 - qdiskd: Enable master_wins if votes=1

Christine Caulfield chrissie at fedoraproject.org
Mon Mar 2 16:41:49 UTC 2015


Gitweb:        http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=81461356e681f6d8c43a2c5edbb6ccadfdbf5f90
Commit:        81461356e681f6d8c43a2c5edbb6ccadfdbf5f90
Parent:        185d70453e39126c28f8425b51d707893f707f0f
Author:        Christine Caulfield <ccaulfie at redhat.com>
AuthorDate:    Mon Mar 2 16:33:29 2015 +0000
Committer:     Christine Caulfield <ccaulfie at redhat.com>
CommitterDate: Mon Mar 2 16:33:29 2015 +0000

qdiskd: Enable master_wins if votes=1

If you specify a value for the quorumd votes attribute, master_wins will
not be auto-enabled.  Because our documentation in multiple places
advertises that master_wins will be enabled if its a two node cluster
without heuristics, this can be misleading for customers.  The internal
logic dictates that if votes is auto-configured to 1 and we have no
heuristics, then master_wins is enabled.  It would be beneficial to
customers expecting auto-configuration of master_wins to also allow for
this when votes is specified as "1".

Signed-off-by: Christine Caulfield <ccaulfie at redhat.com>
---
 cman/qdisk/main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 413c093..c633442 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1946,9 +1946,9 @@ get_config_data(qd_ctx *ctx, struct h_data *h, int maxh, int *cfh)
 			ctx->qc_flags &= ~RF_MASTER_WINS;
 		}
 	} else {
-		if (ctx->qc_flags & RF_AUTO_VOTES &&
-		    !*cfh &&
-		    ctx->qc_auto_votes == 1) { 
+		if (!*cfh && 
+		    ((ctx->qc_flags & RF_AUTO_VOTES && ctx->qc_auto_votes == 1) ||
+		    (!(ctx->qc_flags & RF_AUTO_VOTES) && ctx->qc_votes == 1))) { 
 			/* Two node cluster, no heuristics, 1 vote for
 			 * quorum disk daemon.  Safe to enable master-wins.
 			 * In fact, qdiskd without master-wins in this config


More information about the cluster-commits mailing list