Bug 1448640

Summary: Seeing error "Failed to get the total number of files. Unable to estimate time to complete rebalance" in rebalance logs
Product: [Community] GlusterFS Reporter: Nithya Balachandran <nbalacha>
Component: distributeAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: mainlineCC: amukherj, bugs, rhinduja, tdesala
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.12.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1446165
: 1448864 (view as bug list) Environment:
Last Closed: 2017-09-05 17:29:02 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:
Bug Depends On:    
Bug Blocks: 1446165, 1448864, 1454853    

Description Nithya Balachandran 2017-05-06 14:26:20 UTC
+++ This bug was initially created as a clone of Bug #1446165 +++

Description of problem:
=======================
Seeing error "Failed to get the total number of files. Unable to estimate time to complete rebalance" in rebalance logs

Version-Release number of selected component (if applicable):
3.8.4-24.el7rhgs.x86_64

How reproducible:
1/1

Steps to Reproduce:
===================
1) Create a distributed-replicate volume and start it.
2) FUSE mount on a client.
3) Add few bricks and start rebalance. (This error is seen during remove-brick as well)

Note: This error says it is unable to estimate the time to complete rebalance but we are able to see the rebalance estimate time during add-brick or remove-brick rebalance.

Actual results:
===============
Seeing error "Failed to get the total number of files. Unable to estimate time to complete rebalance" in rebalance logs

Expected results:
=================
We should not see error "Failed to get the total number of files. Unable to estimate time to complete rebalance" in rebalance logs.


--- Additional comment from Nithya Balachandran on 2017-05-02 23:49:08 EDT ---

This is a bug:


In dht-rebalance.c:


ret = gf_defrag_total_file_cnt (this, &loc);                    
if (!ret) {                                                     
        gf_msg (this->name, GF_LOG_ERROR, 0, 0, "Failed to get "
                "the total number of files. Unable to estimate "
                "time to complete rebalance.");                 
}   

This should be 

if (ret) {
 ...

}

Comment 1 Worker Ant 2017-05-06 14:32:42 UTC
REVIEW: https://review.gluster.org/17197 (cluster/dht Fix ret check) posted (#1) for review on master by N Balachandran (nbalacha)

Comment 2 Worker Ant 2017-05-08 04:04:02 UTC
REVIEW: https://review.gluster.org/17197 (cluster/dht: Fix ret check) posted (#2) for review on master by N Balachandran (nbalacha)

Comment 3 Worker Ant 2017-05-08 04:47:40 UTC
COMMIT: https://review.gluster.org/17197 committed in master by Raghavendra G (rgowdapp) 
------
commit 67598f538efb24a9e5ac561b294a05e707e15761
Author: N Balachandran <nbalacha>
Date:   Sat May 6 20:01:16 2017 +0530

    cluster/dht: Fix ret check
    
    Fixed an incorrect return code check in the rebalance
    code.
    
    Change-Id: I60804ff121cec7a2f0419e2ee70dd22ea7533c0c
    BUG: 1448640
    Signed-off-by: N Balachandran <nbalacha>
    Reviewed-on: https://review.gluster.org/17197
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Raghavendra G <rgowdapp>

Comment 4 Shyamsundar 2017-09-05 17:29:02 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.12.0, please open a new bug report.

glusterfs-3.12.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-September/000082.html
[2] https://www.gluster.org/pipermail/gluster-users/