Bug 1447271

Summary: Remove brick does not work when run on replica volumes
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Darshan <dnarayan>
Component: gdeployAssignee: Sachidananda Urs <surs>
Status: CLOSED ERRATA QA Contact: Manisha Saini <msaini>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.2CC: amukherj, rhinduja, rhs-bugs, smohan, storage-qa-internal
Target Milestone: ---   
Target Release: RHGS 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gdeploy-2.0.2-6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-21 04:49:50 UTC Type: Bug
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: 1417151    

Description Darshan 2017-05-02 09:24:41 UTC
Description of problem:
Currently changing replica count of a volume using gdeploy is not possible. Gdeploy should support this.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Gdeploy is being used to perform all gluster related actions in tendrl project. Without this addition tendrl will also not be able to support replica count chan ge for a volume.

Comment 2 Sachidananda Urs 2017-05-02 09:28:22 UTC
This is because of missing replica variable in the playbook.

diff --git a/playbooks/gluster-remove-brick.yml b/playbooks/gluster-remove-brick.yml
index 53c1834..d668741 100644
--- a/playbooks/gluster-remove-brick.yml
+++ b/playbooks/gluster-remove-brick.yml
@@ -10,3 +10,4 @@
              bricks="{{ old_bricks }}"
              replica_count="{{ replica_count }}"
              state="{{ state }}"
+             replica="{{ replica }}"


Adding replica line should fix it.

Comment 3 Sachidananda Urs 2017-05-02 09:30:42 UTC
Commit: https://github.com/gluster/gdeploy/commit/ae4b9df should fix the issue.

Comment 5 Sachidananda Urs 2017-05-03 07:56:35 UTC
Same changes are needed with add-brick as well. This is related issue.

Comment 7 Sachidananda Urs 2017-05-03 11:28:07 UTC
Commit: https://github.com/gluster/gdeploy/commit/335e0de should address the Comment 5.

Comment 8 Darshan 2017-05-05 09:41:13 UTC
Tried with latest build. remove brick seems to have some issue.
Moving it to ASSIGNED state

Comment 9 Sachidananda Urs 2017-05-05 10:54:25 UTC
Commit https://github.com/gluster/gdeploy/commit/10af962 fixes the issue

Comment 10 Manisha Saini 2017-05-08 13:11:54 UTC
Verified this bug on gdeploy-2.0.2-6.el7rhgs.noarch


Remove brick

Steps:
1.Create 1 x 8 = 8 replicate volume
2.Change replica-count to 7 by removing a brick via gdeploy


[hosts]
dhcp37-102.lab.eng.blr.redhat.com
dhcp37-92.lab.eng.blr.redhat.com
dhcp37-119.lab.eng.blr.redhat.com
dhcp37-122.lab.eng.blr.redhat.com

[volume]
action=remove-brick
volname=10.70.37.102:ganesha_replica
bricks=dhcp37-122.lab.eng.blr.redhat.com:/gluster/brick1/5
replica_count=7
state=force
replica=yes


Add brick

1.Again convert replica 7 to replica 8 by adding a brick via gdeploy


[hosts]
dhcp37-102.lab.eng.blr.redhat.com
dhcp37-92.lab.eng.blr.redhat.com
dhcp37-119.lab.eng.blr.redhat.com
dhcp37-122.lab.eng.blr.redhat.com


[volume]
action=add-brick
volname=10.70.37.102:ganesha_replica
bricks=dhcp37-122.lab.eng.blr.redhat.com:/gluster/brick1/5
replica_count=8
state=force
replica=yes

Comment 12 errata-xmlrpc 2017-09-21 04:49:50 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.

https://access.redhat.com/errata/RHBA-2017:2777