Bug 1476410 - glusterd: code lacks clarity of logic in glusterd_get_quorum_cluster_counts()
glusterd: code lacks clarity of logic in glusterd_get_quorum_cluster_counts()
Product: GlusterFS
Classification: Community
Component: glusterd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michael Adam
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2017-07-28 18:46 EDT by Michael Adam
Modified: 2017-12-08 12:36 EST (History)
2 users (show)

See Also:
Fixed In Version: glusterfs-3.13.0
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-12-08 12:36:32 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Adam 2017-07-28 18:46:34 EDT
This is counter-intuitive:

ret = gf_string2percent (val, &quorum_percentage);
if (!ret)
    ratio = _gf_true;

since !ret sounds like failure but ret == 0 signifies success here.
Comment 1 Worker Ant 2017-07-28 18:51:24 EDT
REVIEW: https://review.gluster.org/17912 (glusterd: improve intuitivity of check in glusterd_get_quorum_cluster_counts) posted (#1) for review on master by Michael Adam (obnox@samba.org)
Comment 2 Worker Ant 2017-07-31 05:27:54 EDT
COMMIT: https://review.gluster.org/17912 committed in master by Atin Mukherjee (amukherj@redhat.com) 
commit 96b179850d618c99d185ce7bfed5fe96e6cde919
Author: Michael Adam <obnox@samba.org>
Date:   Tue Jun 13 10:16:27 2017 +0200

    glusterd: improve intuitivity of check in glusterd_get_quorum_cluster_counts
    More intuitive to check for ret == 0 than !ret here...
    Change-Id: I8177a0bc8f266331187f5f2eeefea8a25cfcb30a
    Signed-off-by: Michael Adam <obnox@samba.org>
    BUG: 1476410
    Reviewed-on: https://review.gluster.org/17912
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
    Tested-by: Atin Mukherjee <amukherj@redhat.com>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Comment 3 Shyamsundar 2017-12-08 12:36:32 EST
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.13.0, please open a new bug report.

glusterfs-3.13.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/announce/2017-December/000087.html
[2] https://www.gluster.org/pipermail/gluster-users/

Note You need to log in before you can comment on or make changes to this bug.