Bug 1046568 - remove-brick : Improvements needed in remove-brick functionality
Summary: remove-brick : Improvements needed in remove-brick functionality
Keywords:
Status: CLOSED EOL
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Ravishankar N
QA Contact: storage-qa-internal@redhat.com
URL:
Whiteboard:
: 996026 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-26 07:11 UTC by spandura
Modified: 2015-12-03 17:18 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-03 17:18:18 UTC
Embargoed:


Attachments (Terms of Use)

Description spandura 2013-12-26 07:11:25 UTC
Description of problem:
=====================
1) Usage: volume remove-brick <VOLNAME> [replica <COUNT>] <BRICK> ... [start|stop|status|commit|force]

remove-brick "commit" can be executed with "force" option or without any option. Hence the Usage should be : 

Usage: volume remove-brick <VOLNAME> [replica <COUNT>] <BRICK> ... [start|stop|status|commit [force]|force]

2) "commit" or "commit force" should not succeed if the remove-brick process is not "started" on the specified bricks of the volume. 

3)  If we want to remove a brick when the volume is not in started state, then we should use the remove-brick command without any option or with "force" option. Hence the error message reported when remove-brick "start" is executed without starting the volume should be changed. 

Message reported: 
==================
gluster v remove-brick vol_dis_rep <BRICK> ... start
volume remove-brick start: failed: Volume vol_dis_rep needs to be started before remove-brick (you can use 'force' or 'commit' to override this behavior)

Expected Message: 
=================
gluster v remove-brick vol_dis_rep <BRICK> ... start
volume remove-brick start: failed: Volume vol_dis_rep needs to be started before remove-brick (you can use 'force' option or execute remove-brick without any option to override this behavior)

Note : remove-brick command without any option points to  remove-brick command with "force" option. 

4) When remove-brick is executed with "commit force" option and if the brick path is not valid, the following is the error message reported: 

Message reported: 
==================
gluster v remove-brick vol_dis_rep rhs-client11:/rhs/bricks/b3 rhs-client12:/rhs/bricks/b3-rep1 start force
wrong brick type: start, use <HOSTNAME>:<export-dir-abs-path>
Usage: volume remove-brick <VOLNAME> [replica <COUNT>] <BRICK> ... [start|stop|status|commit|force]

Here the brick path is not valid. But the message reported is "wrong brick type" 

Expected message:
==================
volume remove-brick commit force: failed: Incorrect brick rhs-client13:/rhs/bricks/vol-rep-b3 for volume vol_dis_rep 

Version-Release number of selected component (if applicable):
============================================================
glusterfs 3.4.0.52rhs built on Dec 19 2013 12:20:16

Cases to verify:
=================
1)For "start", "stop", "status", "commit" and "commit force" the volume should be in started state . 

2) For "start", "stop", "status", "commit" , "commit force" ,"force" check if the brick path is valid for the volume before performing the any operation. 

Volume Name: vol_dis_rep
Type: Distributed-Replicate
Volume ID: 0b28d085-9715-4d79-ba7b-b830faa9f3f6
Status: Started
Number of Bricks: 4 x 2 = 8
Transport-type: tcp
Bricks:
Brick1: rhs-client11:/rhs/bricks/b1
Brick2: rhs-client12:/rhs/bricks/b1-rep1
Brick3: rhs-client11:/rhs/bricks/b2
Brick4: rhs-client12:/rhs/bricks/b2-rep1
Brick5: rhs-client11:/rhs/bricks/b3
Brick6: rhs-client12:/rhs/bricks/b3-rep1
Brick7: rhs-client11:/rhs/bricks/b4
Brick8: rhs-client12:/rhs/bricks/b4-rep1


root@rhs-client11 [Dec-26-2013- 6:57:48] >gluster v remove-brick vol_dis_rep rhs-client11:/rhs/bricks/b5 rhs-client12:/rhs/bricks/b5-rep1 stop
                                    Node Rebalanced-files          size       scanned      failures       skipped               status   run time in secs
                               ---------      -----------   -----------   -----------   -----------   -----------         ------------     --------------
'remove-brick' 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 remove-brick process for completion before doing any further brick related tasks on the volume.

The brick path is not valid , But still the proper error message is not reported. 

3) "stop" , "status", "commit" and "commit force" the remove-brick process should be started on the valid bricks of the volume. 

4) For reducing the replica count of the volume using remove-brick one should use remove-brick command with "force" option or remove-brick without any options.

Comment 2 Ravishankar N 2014-01-06 07:38:35 UTC
Currently remove-brick does not support a commit-force option.(i.e.commit and force are mutually exclusive).

So we need to introduce commit+force combination as described above, i.e.:

Usage: volume remove-brick <VOLNAME> [replica <COUNT>] <BRICK> ... [start|stop|status|commit [force]|force]

wherein 'commit force' must work while even if commit fails. Other checks must be as described above.

Comment 3 SATHEESARAN 2014-03-19 11:33:38 UTC
This bug - https://bugzilla.redhat.com/show_bug.cgi?id=996026
was raised exactly for the issue 2, as in comment0 ( description of this bug )

I am marking that bug as DUPE of this bug

Comment 4 SATHEESARAN 2014-03-19 11:34:54 UTC
*** Bug 996026 has been marked as a duplicate of this bug. ***

Comment 5 Vivek Agarwal 2015-12-03 17:18:18 UTC
Thank you for submitting this issue for consideration in Red Hat Gluster Storage. The release for which you requested us to review, is now End of Life. Please See https://access.redhat.com/support/policy/updates/rhs/

If you can reproduce this bug against a currently maintained version of Red Hat Gluster Storage, please feel free to file a new report against the current release.


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