diff options
author | Michael Adam <obnox@samba.org> | 2017-06-13 10:06:57 +0200 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-06-14 12:49:29 +0000 |
commit | c5b81783d5532a3b3a2bd1948bd1c9bfa4a023e1 (patch) | |
tree | 9118d3ef05251f387cb2425850d36d43c57dad75 | |
parent | ca97c98cc633e3b82a65291969d8bd8f8d8d5d3e (diff) |
glusterd: fix quorum calculation if percentage is not specified correctly
There was an extra "ratio = _gf_true".
- In case the ratio was specified correctly
in the volfile, this is redundant.
- In case the ratio was specified, but not parseable
into a precentage, this is wrong and would
lead to a quorum count of 0 instead of falling
back to the default of 50% + 1.
This patch removes the extra setting of "ratio".
Change-Id: I2bd57ebf1b8989e905481a2b6285a1f422942f72
BUG: 1461129
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-on: https://review.gluster.org/17538
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Atin Mukherjee <amukherj@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-server-quorum.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-server-quorum.c b/xlators/mgmt/glusterd/src/glusterd-server-quorum.c index 606d33e8c5d..a4637f84368 100644 --- a/xlators/mgmt/glusterd/src/glusterd-server-quorum.c +++ b/xlators/mgmt/glusterd/src/glusterd-server-quorum.c @@ -234,7 +234,6 @@ glusterd_get_quorum_cluster_counts (xlator_t *this, int *active_count, ret = dict_get_str (conf->opts, GLUSTERD_QUORUM_RATIO_KEY, &val); if (ret == 0) { - ratio = _gf_true; ret = gf_string2percent (val, &quorum_percentage); if (!ret) ratio = _gf_true; |