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>
This commit is contained in:
parent
ca97c98cc6
commit
c5b81783d5
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user