Bug 1030426

Summary: Remove-brick status command actually shows the status of the last run rebalance
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Shruti Sampat <ssampat>
Component: distributeAssignee: Nithya Balachandran <nbalacha>
Status: CLOSED DEFERRED QA Contact: storage-qa-internal <storage-qa-internal>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.1CC: knarra, mmahoney, mmccune, sdharane, spalai, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1286203 (view as bug list) Environment:
Last Closed: 2015-11-27 12:28:23 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: 1286203    

Description Shruti Sampat 2013-11-14 12:28:35 UTC
Description of problem:
-----------------------
After stopping remove-brick operation on a volume, rebalance was run on the same volume. After completion of the rebalance operation, remove-brick status command, does not show the status of the most recent remove-brick operation, instead shows the status of the last rebalance.

Output of remove-brick status before rebalance was started -

[root@rhs ~]# gluster v remove-brick dis_vol 10.70.37.77:/rhs/brick1/b1 status
                                    Node Rebalanced-files          size       scanned      failures       skipped         status run-time in secs
                               ---------      -----------   -----------   -----------   -----------   -----------   ------------   --------------
                               localhost               14        13.7GB            72             0             0      completed           262.00
                             10.70.37.96                0        0Bytes             0             0             0    not started             0.00
                            10.70.37.159                0        0Bytes             0             0             0    not started             0.00
                            10.70.37.140                0        0Bytes             0             0             0    not started             0.00


Output of rebalance status after it was completed -

[root@rhs ~]# gluster v rebalance dis_vol status
                                    Node Rebalanced-files          size       scanned      failures       skipped               status   run time in secs
                               ---------      -----------   -----------   -----------   -----------   -----------         ------------     --------------
                               localhost                0        0Bytes            71             0             0            completed               0.00
                             10.70.37.96                0        0Bytes            85             0             0            completed               0.00
                            10.70.37.159                0        0Bytes            87             0             0            completed               0.00
                            10.70.37.140                0        0Bytes            87             0             0            completed               0.00

Output of remove-brick status after completion of rebalance - 

[root@rhs ~]# gluster v remove-brick dis_vol 10.70.37.77:/rhs/brick1/b1 status                                                                                                                                 
                                    Node Rebalanced-files          size       scanned      failures       skipped         status run-time in secs
                               ---------      -----------   -----------   -----------   -----------   -----------   ------------   --------------
                               localhost                0        0Bytes            71             0             0      completed             0.00
                             10.70.37.96                0        0Bytes            85             0             0      completed             0.00
                            10.70.37.159                0        0Bytes            87             0             0      completed             0.00
                            10.70.37.140                0        0Bytes            87             0             0      completed             0.00

The remove brick status should always show the status of the last remove-brick operation run.

Version-Release number of selected component (if applicable):
glusterfs 3.4.0.42.1u2rhs

How reproducible:
Always

Steps to Reproduce:
1. Start remove-brick on a volume and after the data migration is completed, stop the remove brick operation, check the remove-brick status.
2. Start rebalance on the same volume.
3. After rebalance completes, check the status.
4. Check the remove-brick status for the previous remove-brick operation ( started in step 1 )
 
Actual results:
Remove brick status shows status of the previous rebalance.

Expected results:
Remove-brick status should show the status of the most recent remove-brick operation.

Additional info:

Comment 4 Susant Kumar Palai 2015-11-27 12:28:23 UTC
Cloning this to 3.1. To be fixed in future release.