Bug 772544

Summary: [5303f98f674ab5cb600dde0394ff7ddd5ba3c98a]: add-brick command tells operation failed, but does not tell reason
Product: [Community] GlusterFS Reporter: Rahul C S <rahulcs>
Component: cliAssignee: Amar Tumballi <amarts>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: high    
Version: 3.3-betaCC: gluster-bugs, rfortier, vraman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 17:23:38 UTC Type: ---
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: 817967    

Description Rahul C S 2012-01-09 06:54:18 UTC
Description of problem:
If the user does not add proper number of bricks to an add-brick operation, then it should suggest valid number of bricks that can be added, like before.

Example:
root@Dagobah:~/nfs/hearya# gluster volume info str
 
Volume Name: str
Type: Distributed-Stripe
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: dagobah:/data/export20
Brick2: dagobah:/data/export21
Brick3: dagobah:/data/export22
Brick4: dagobah:/data/export23
root@Dagobah:~/nfs/hearya# gluster volume add-brick
Usage: volume add-brick <VOLNAME> [<stripe|replica> <COUNT>] <NEW-BRICK> ...
root@Dagobah:~/nfs/hearya# gluster volume add-brick str replica 2 dagobah:/data/export24
Operation failed
root@Dagobah:~/nfs/hearya# gluster volume add-brick str replica 2 dagobah:/data/export24 dagobah:/data/export25
Operation failed
root@Dagobah:~/nfs/hearya# gluster volume add-brick str replica 2 dagobah:/data/export24 dagobah:/data/export25 dagobah:/data/export26
Operation failed
root@Dagobah:~/nfs/hearya# gluster volume add-brick str replica 2 dagobah:/data/export24 dagobah:/data/export25 dagobah:/data/export26 dagobah:/data/export27
Add Brick successful
root@Dagobah:~/nfs/hearya# gluster volume info str
 
Volume Name: str
Type: Distributed-Striped-Replicate
Status: Started
Number of Bricks: 2 x 2 x 2 = 8
Transport-type: tcp
Bricks:
Brick1: dagobah:/data/export20
Brick2: dagobah:/data/export24
Brick3: dagobah:/data/export21
Brick4: dagobah:/data/export25
Brick5: dagobah:/data/export22
Brick6: dagobah:/data/export26
Brick7: dagobah:/data/export23
Brick8: dagobah:/data/export27

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Anand Avati 2012-03-29 15:00:40 UTC
CHANGE: http://review.gluster.com/3032 (glusterd: add-brick: give proper reason in few error cases) merged in master by Vijay Bellur (vijay)

Comment 2 Rahul C S 2012-04-04 13:25:16 UTC
Verified against master 3c5aed7d8226e50296c6a7106e0d59682732e9b5
gives proper error message.