Bug 1025240 - remove-brick : Improvements needed in remove-brick grammar, command execution output messages and documentation
remove-brick : Improvements needed in remove-brick grammar, command execution...
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: glusterd (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: RHGS 2.1.2
Assigned To: Ravishankar N
: ZStream
Depends On:
Blocks: 1027270
  Show dependency treegraph
Reported: 2013-10-31 06:02 EDT by spandura
Modified: 2015-05-13 12:29 EDT (History)
6 users (show)

See Also:
Fixed In Version: glusterfs-
Doc Type: Bug Fix
Doc Text:
The output message of the remove-brick command is modified to "Migration of data is not needed when reducing replica count. Use the 'force' option".
Story Points: ---
Clone Of:
: 1027270 (view as bug list)
Last Closed: 2014-02-25 02:58:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description spandura 2013-10-31 06:02:43 EDT
Description of problem:
Grammar: Usage: volume remove-brick <VOLNAME> [replica <COUNT>] <BRICK> ... {start|stop|status|commit|force}

remove-brick can be executed without any options i.e we need not have to use any of these options : "{start|stop|status|commit|force}". Hence We should be placing these options in between "[ ]" brackets. 

Command execution output message improvements:
Command 1 :  gluster v remove-brick replica 2 rhs-client13:/rhs/bricks/b3 start

wrong brick type: 2, use <HOSTNAME>:<export-dir-abs-path>
Usage: volume remove-brick <VOLNAME> [replica <COUNT>] <BRICK> ... {start|stop|status|commit|force}

In this case we have not specified the volume name. The error message should just be the "Usage". The additional message :"wrong brick type: 2, use <HOSTNAME>:<export-dir-abs-path>" is confusing and doesn't make any sense in this context. Why would the brick type be "<HOSTNAME>:<export-dir-abs-path>" ?

Command 2 : gluster v remove-brick vol_rep replica 2 rhs-client13:/rhs/bricks/b3 start

volume remove-brick start: failed: Rebalancing not needed when reducing replica count. Try without the 'start' option

a. Instead of "Rebalancing not needed" message it would be appropriate to replace it with "Migration of data is not needed"

b. Try without the 'start' option can be replaced with "Use 'force' option"

Documentation improvements:

Documentation link : http://documentation-devel.engineering.redhat.com/docs/en-US/Red_Hat_Storage/2.1-RC/html/Administration_Guide/sect-User_Guide-Managing_Volumes-Shrinking.html

1. Existing documentation doesn't have information about the usage of remove-brick command when we are reducing the replica count i.e "gluster volume remove-brick VOLNAME replica <replica_count> BRICK force". The changes which went into the patch "https://code.engineering.redhat.com/gerrit/#/c/11755/" needs to documented. 

Version-Release number of selected component (if applicable):
glusterfs built on Oct 21 2013 14:00:58
Comment 2 Ravishankar N 2013-11-06 08:00:13 EST
Command 1 :  gluster v remove-brick replica 2 rhs-client13:/rhs/bricks/b3 start

wrong brick type: 2, use <HOSTNAME>:<export-dir-abs-path>
Usage: volume remove-brick <VOLNAME> [replica <COUNT>] <BRICK> ... {start|stop|status|commit|force}
Though the 'wrong brick type 2' log might not make sense at first glance, the 'Usage' log helps interpret the output in a meaningful way, more so for sys-admins. According to the Usage syntax, the word that follows 'gluster v remove-brick' is parsed as the VOLNAME. Here it happens to be 'replica'. If the next phrase is the optional keyword 'replica', the subsequent argument must be an integer (the replica count). Since that isn't the case, the CLI expects that the next phrase ('2' in this case) to be a brick-path of the format "<HOSTNAME>:<export-dir-abs-path>". If there is a format mismatch it gives out the error message.

On a lighter note, the message is akin to a cryptic compiler error which might not make full sense immediately but tells you exactly what the error is :)

The other improvements in the description can be addressed.
Comment 3 Ravishankar N 2013-11-11 05:18:31 EST
Downstream Patch:https://code.engineering.redhat.com/gerrit/#/c/15498/
Comment 4 Ravishankar N 2013-11-13 03:28:51 EST
Existing documentation needs to be updated as detailed in bug description.
Comment 5 spandura 2013-12-26 02:14:40 EST
Verified the fix on the build glusterfs built on Dec 19 2013 12:20:16. The improvements mentioned is verified. Refer to bug 1046568 for further improvements in remove-brick command. 

Moving this bug to verified state.
Comment 6 Pavithra 2014-01-03 00:06:29 EST
Can you please verify this doc text and ensure its technically correct?
Comment 7 Ravishankar N 2014-01-03 01:35:35 EST
Comment 8 Pavithra 2014-01-07 04:56:15 EST
Can you please verify the doc text for technical accuracy?
Comment 9 Ravishankar N 2014-01-07 07:00:49 EST
Comment 11 errata-xmlrpc 2014-02-25 02:58:40 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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