Bug 765253 (GLUSTER-3521)

Summary: ordering of 'stripe', 'replica' or 'transport' should not matter while using 'gluster volume create'
Product: [Community] GlusterFS Reporter: M S Vishwanath Bhat <vbhat>
Component: cliAssignee: Amar Tumballi <amarts>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: pre-releaseCC: gluster-bugs, mzywusko, rabhat, vraman
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: glusterfs-3.3.0qa9 Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description M S Vishwanath Bhat 2011-09-07 10:14:51 UTC
In current scenario while using 'gluster volume create', replica or stripe count should always come before specifying the transport type. But Since we are specifying the keywords 'replica', 'stripe' and 'transport' in command , their ordering should not matter. 'gluster volume create' should succeed even if transport type is specified before replica or stripe count.


In the master I get following output if I specify transport before replica count.

root@tortuga:/gluster/glusterfs# gluster volume create hosdu transport tcp replica 2 tortuga:/tmp/brick1/ tortuga:/tmp/brick2/ tortuga:/tmp/brick3/ tortuga:/tmp/brick4/
Creation of volume hosdu has been unsuccessful


If I interchange the order volume creation succeeds.

root@tortuga:/etc/glusterd/vols# gluster volume create hosdu replica 2 transport tcp tortuga:/tmp/brick1/ tortuga:/tmp/brick2/ tortuga:/tmp/brick3/ tortuga:/tmp/brick4/
Creation of volume hosdu has been successful. Please start the volume to access data.

Comment 1 Anand Avati 2011-09-09 05:51:08 UTC
CHANGE: http://review.gluster.com/370 (now 'replica' 'stripe' and 'transport' options can be given in any order) merged in master by Vijay Bellur (vijay)

Comment 2 Raghavendra Bhat 2011-09-16 03:55:37 UTC
tested with glusterfs-3.3.0qa9. gluster volume create worked properly irrespective of the order of the transport time and the replica/stripe count.

gluster volume create mirror replica 2 transport rdma hyperspace:/mnt/sda7/export hyperspace:/mnt/sda8/export
Creation of volume mirror has been successful. Please start the volume to access data.
root@hyperspace:/home/raghu# gluster volume info
 
Volume Name: mirror
Type: Replicate
Status: Created
Number of Bricks: 2
Transport-type: rdma
Bricks:
Brick1: hyperspace:/mnt/sda7/export
Brick2: hyperspace:/mnt/sda8/export
root@hyperspace:/home/raghu# gluster volume delete mirror --mode=script
Deleting volume mirror has been successful
root@hyperspace:/home/raghu# gluster volume create mirror transport rdma replica 2 hyperspace:/mnt/sda7/export hyperspace:/mnt/sda8/export
Creation of volume mirror has been successful. Please start the volume to access data.
root@hyperspace:/home/raghu# gluster volume info
 
Volume Name: mirror
Type: Replicate
Status: Created
Number of Bricks: 2
Transport-type: rdma
Bricks:
Brick1: hyperspace:/mnt/sda7/export
Brick2: hyperspace:/mnt/sda8/expor