Bug 1025240 - remove-brick : Improvements needed in remove-brick grammar, command execution output messages and documentation
Summary: remove-brick : Improvements needed in remove-brick grammar, command execution...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: 2.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: RHGS 2.1.2
Assignee: Ravishankar N
QA Contact: spandura
URL:
Whiteboard:
Depends On:
Blocks: 1027270
TreeView+ depends on / blocked
 
Reported: 2013-10-31 10:02 UTC by spandura
Modified: 2015-05-13 16:29 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.4.0.43.1u2rhs-1
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".
Clone Of:
: 1027270 (view as bug list)
Environment:
Last Closed: 2014-02-25 07:58:40 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:0208 0 normal SHIPPED_LIVE Red Hat Storage 2.1 enhancement and bug fix update #2 2014-02-25 12:20:30 UTC

Description spandura 2013-10-31 10:02:43 UTC
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 3.4.0.35.1u2rhs built on Oct 21 2013 14:00:58

Comment 2 Ravishankar N 2013-11-06 13:00:13 UTC
-------------------------------
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 10:18:31 UTC
Downstream Patch:https://code.engineering.redhat.com/gerrit/#/c/15498/

Comment 4 Ravishankar N 2013-11-13 08:28:51 UTC
Existing documentation needs to be updated as detailed in bug description.

Comment 5 spandura 2013-12-26 07:14:40 UTC
Verified the fix on the build glusterfs 3.4.0.52rhs 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 05:06:29 UTC
Can you please verify this doc text and ensure its technically correct?

Comment 7 Ravishankar N 2014-01-03 06:35:35 UTC
LGTM

Comment 8 Pavithra 2014-01-07 09:56:15 UTC
Can you please verify the doc text for technical accuracy?

Comment 9 Ravishankar N 2014-01-07 12:00:49 UTC
Verified.

Comment 11 errata-xmlrpc 2014-02-25 07:58:40 UTC
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.

http://rhn.redhat.com/errata/RHEA-2014-0208.html


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