Bug 765390 (GLUSTER-3658)

Summary: Removal of single brick allowed on replicate only volume
Product: [Community] GlusterFS Reporter: Louis Zuckerman <glusterbugs>
Component: cliAssignee: Amar Tumballi <amarts>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: mainlineCC: gluster-bugs, vraman
Target Milestone: ---   
Target Release: ---   
Hardware: All   
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: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Louis Zuckerman 2011-09-28 18:42:04 UTC
(In reply to comment #0)
> Bricks:
> Brick1: 10.168.100.242:/var/tmp/test0

oops forgot to clean up the host address & path, that should read 
Brick1: server:/brick/test0

Comment 1 Louis Zuckerman 2011-09-28 21:39:17 UTC
The gluster CLI allows removal of a single brick from a replicate only volume.  This can lead to invalid Replicate configurations such as "Number of Bricks: 1" or even worse, "Number of Bricks: 1 x 2 = 3"

I've tested this on 3.1.x, 3.2.x, and git master 3.3.0qa9+, as far as I can tell it exists in all versions of gluster CLI.

To reproduce the behavior...

# gluster volume create test replica 2 server:/brick/test{0..1}

# gluster volume start test

# gluster volume info

Volume Name: test
Type: Replicate
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: server:/brick/test0
Brick2: server:/brick/test1

# gluster volume remove-brick test server:/brick/test1

# gluster volume info

Volume Name: test
Type: Replicate
Status: Started
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: 10.168.100.242:/var/tmp/test0

# gluster volume add-brick test server:/brick/test{2..3}

# gluster volume info

Volume Name: test
Type: Distributed-Replicate
Status: Started
Number of Bricks: 1 x 2 = 3
Transport-type: tcp
Bricks:
Brick1: server:/brick/test0
Brick2: server:/brick/test2
Brick3: server:/brick/test3

Thank you.

Comment 2 Amar Tumballi 2011-09-30 02:31:18 UTC
With 'volume type' change 'bug 765037' (patch at http://review.gluster.com/158) this should not be a problem. I will keep it open till that patch gets merged.

Comment 3 Amar Tumballi 2011-10-28 09:47:34 UTC
bug 765037 is now closed. Not planing to backport it to release-3.2 branch, and hence if you test the git 'master' branch, you should see this problem going away. Please re-open if still exists.