Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1476410

Summary: glusterd: code lacks clarity of logic in glusterd_get_quorum_cluster_counts()
Product: [Community] GlusterFS Reporter: Michael Adam <madam>
Component: glusterdAssignee: Michael Adam <madam>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: amukherj, bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.13.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-08 17:36:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Adam 2017-07-28 22:46:34 UTC
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 22:51:24 UTC
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)

Comment 2 Worker Ant 2017-07-31 09:27:54 UTC
COMMIT: https://review.gluster.org/17912 committed in master by Atin Mukherjee (amukherj) 
------
commit 96b179850d618c99d185ce7bfed5fe96e6cde919
Author: Michael Adam <obnox>
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>
    BUG: 1476410
    Reviewed-on: https://review.gluster.org/17912
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Atin Mukherjee <amukherj>
    Tested-by: Atin Mukherjee <amukherj>
    CentOS-regression: Gluster Build System <jenkins.org>

Comment 3 Shyamsundar 2017-12-08 17:36:32 UTC
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/