Blob Blame History Raw
From 89434fbba97386d37c72fff291c1f072a00e4ff8 Mon Sep 17 00:00:00 2001
From: Atin Mukherjee <amukherj@redhat.com>
Date: Thu, 9 Feb 2017 10:13:20 +0530
Subject: [PATCH 330/361] glusterd: set default GLUSTERD_QUORUM_RATIO_KEY value
 to 51

The default value of GLUSTERD_QUORUM_RATIO_KEY is set to 0, while this
doesn't harm any functionality as the actual quorum calculation logic
always take the factor that if the key is not set in the dictionary the
value is considered to be 51 but from an user perspective it gives an
incorrect output through volume get where quorum-ratio is always shown as
0 until reconfigured.

mainline:
> BUG: 1420611
> Reviewed-on: https://review.gluster.org/16572
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
(cherry picked from commit 74066edba53eab41f7f3b1aae24b6e0bb5988860)

BUG: 1323928
Change-Id: I087712fa4736055859f29cc3bdbb3b111cbe7224
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/101311
Tested-by: Milind Changire <mchangir@redhat.com>
---
 xlators/mgmt/glusterd/src/glusterd-op-sm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index ef31cdb..b07fa30 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -67,7 +67,7 @@ glusterd_set_shared_storage (dict_t *dict, char *key, char *value,
  * in glusterd_get_global_options_for_all_vols, or else we might crash there.
  */
 glusterd_all_vol_opts valid_all_vol_opts[] = {
-        { GLUSTERD_QUORUM_RATIO_KEY,            "0" },
+        { GLUSTERD_QUORUM_RATIO_KEY,            "51" },
         { GLUSTERD_SHARED_STORAGE_KEY,          "disable" },
         /* This one actually gets filled in dynamically. */
         { GLUSTERD_GLOBAL_OP_VERSION_KEY,       "BUG_NO_OP_VERSION"},
-- 
1.8.3.1