Bug 1476410 - glusterd: code lacks clarity of logic in glusterd_get_quorum_cluster_counts()
Summary: glusterd: code lacks clarity of logic in glusterd_get_quorum_cluster_counts()
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Adam
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-28 22:46 UTC by Michael Adam
Modified: 2017-12-08 17:36 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.13.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-08 17:36:32 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

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/


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