Bug 1299334

Summary: gluster dht(rebalance): rebalance status is not shown properly after stopping and re-starting the rebalance process immediately on volume.
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Triveni Rao <trao>
Component: distributeAssignee: Nithya Balachandran <nbalacha>
Status: CLOSED WONTFIX QA Contact: storage-qa-internal <storage-qa-internal>
Severity: medium Docs Contact:
Priority: medium    
Version: rhgs-3.1CC: kramdoss, mzywusko, nbalacha, nchilaka, rcyriac, smohan
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: dht-rebalance-usability
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-16 18:17:35 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 Triveni Rao 2016-01-18 07:13:09 UTC
Description of problem:
=======================
rebalance status is not shown properly after stopping and re-starting the rebalance process immediately on volume.

Rebalance status shows "its already started" even though rebalance is stopped on a volume.

Version-Release number of selected component (if applicable):
=============================================================
glusterfs-3.7.5-15.el6rhs.x86_64

How reproducible:
=================
easily

Steps to Reproduce:
1.Create 2x2 distrep-volume or any volume.
2.mount it and add some huge file like around10G
3.add brick and start rebalance.
4. when rebalance is in progress stop rebalance process.
5. Now check the rebalance status, it shows rebalance not started.
6. Now try to restart rebalance, check that it shows rebalance is already started.


Actual results:
===============
Rebalance is already started.

Expected results:
=================
Rebalance start command should show proper output such as rebalance is not started or not running instead rebalance is already started.


Additional info:
================
[root@dhcp47-93 ~]# gluster v add-brick distrep_test replica 2 dhcp47-93.lab.eng.blr.redhat.com:/rhgs/brick2/test2 dhcp47-96.lab.eng.blr.redhat.com:/rhgs/brick2/test2 force
volume add-brick: success
[root@dhcp47-93 ~]# 
[root@dhcp47-93 ~]# 
[root@dhcp47-93 ~]# gluster v info distrep_test
 
Volume Name: distrep_test
Type: Distributed-Replicate
Volume ID: fff99355-c429-49b9-9280-4768c33c4814
Status: Started
Number of Bricks: 3 x 2 = 6
Transport-type: tcp
Bricks:
Brick1: dhcp47-93.lab.eng.blr.redhat.com:/rhgs/brick2/test3
Brick2: dhcp47-96.lab.eng.blr.redhat.com:/rhgs/brick2/test3
Brick3: dhcp47-93.lab.eng.blr.redhat.com:/rhgs/brick2/test4
Brick4: dhcp47-96.lab.eng.blr.redhat.com:/rhgs/brick2/test4
Brick5: dhcp47-93.lab.eng.blr.redhat.com:/rhgs/brick2/test2
Brick6: dhcp47-96.lab.eng.blr.redhat.com:/rhgs/brick2/test2
Options Reconfigured:
features.barrier: disable
auth.allow: *
user.cifs: enable
nfs.disable: off
performance.readdir-ahead: on
cluster.enable-shared-storage: enable
[root@dhcp47-93 ~]# 
[root@dhcp47-93 ~]



[root@dhcp47-93 ~]# gluster v rebalance distrep_test start force
volume rebalance: distrep_test: success: Rebalance on distrep_test has been started successfully. Use rebalance status command to check status of the rebalance process.
ID: c562d80a-4963-48ca-95ae-375a20ecbf8f

[root@dhcp47-93 ~]# gluster v rebalance distrep_test status
                                    Node Rebalanced-files          size       scanned      failures       skipped               status   run time in secs
                               ---------      -----------   -----------   -----------   -----------   -----------         ------------     --------------
                               localhost                0        0Bytes             5             0             0          in progress              14.00
        dhcp47-96.lab.eng.blr.redhat.com                0        0Bytes             0             0             0            completed               0.00
volume rebalance: distrep_test: success
[root@dhcp47-93 ~]# 


[root@dhcp47-93 ~]# gluster v rebalance distrep_test stop
                                    Node Rebalanced-files          size       scanned      failures       skipped               status   run time in secs
                               ---------      -----------   -----------   -----------   -----------   -----------         ------------     --------------
                               localhost                0        0Bytes             5             0             0              stopped              21.00
        dhcp47-96.lab.eng.blr.redhat.com                0        0Bytes             0             0             0            completed               0.00
volume rebalance: distrep_test: success: rebalance process may be in the middle of a file migration.
The process will be fully stopped once the migration of the file is complete.
Please check rebalance process for completion before doing any further brick related tasks on the volume.

[root@dhcp47-93 ~]# 
[root@dhcp47-93 ~]# gluster v rebalance distrep_test status
volume rebalance: distrep_test: failed: Rebalance not started.
[root@dhcp47-93 ~]#
[root@dhcp47-93 ~]#
[root@dhcp47-93 ~]# gluster v rebalance distrep_test start force
volume rebalance: distrep_test: failed: Rebalance on distrep_test is already started
[root@dhcp47-93 ~]#

Comment 7 Nithya Balachandran 2016-09-16 05:05:02 UTC
*** Bug 1367807 has been marked as a duplicate of this bug. ***