Bug 1489876

Summary: cli must throw a warning to discourage use of x2 volume which will be deprecated
Product: Red Hat Gluster Storage Reporter: Nag Pavan Chilakam <nchilaka>
Component: replicateAssignee: Karthik U S <ksubrahm>
Status: CLOSED ERRATA QA Contact: Vijay Avuthu <vavuthu>
Severity: medium Docs Contact:
Priority: high    
Version: rhgs-3.3CC: ksubrahm, ravishankar, rhinduja, rhs-bugs, sheggodu, srmukher, storage-qa-internal
Target Milestone: ---   
Target Release: RHGS 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rebase
Fixed In Version: glusterfs-3.12.2-1 Doc Type: Release Note
Doc Text:
Since replica 2 volumes are prone to split-brain, they will be deprecated in the future releases of Red Hat Gluster Storage 3.4. Therefore, while creating a replica 2 volume, an appropriate warning message is displayed which recommends to use the Arbiter or replica 3 configurations.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 06:35:11 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:
Bug Depends On:    
Bug Blocks: 1503134    

Description Nag Pavan Chilakam 2017-09-08 14:42:51 UTC
Description of problem:
rhgs roadmap going forward is to discourage and then deprecate x2 configurations to avoid split brains.
we have updated the document, but the same needs to be even seen on cli
(ref doc bug#1482352 - Discourage replica 2 configurations )

update cli to warn x2 creations in all below cases:
1)while creating x2 volume
2)while converting distribute only to x2
3)while removing bricks from x3 to convert to x2
4)while adding/removing bricks in x2 configurations

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

Additional info:

Comment 2 Nag Pavan Chilakam 2017-09-08 14:44:49 UTC
ravi, we need to take this bug for sure in 3.4.0 to be in sync with documentation

Comment 3 Ravishankar N 2017-09-08 15:03:55 UTC
Agreed. Karthik's patch https://review.gluster.org/16899 is already merged upstream to address this issue and will automatically make it to 3.4.0. downstream.

Here is the sample output:
[root@vm4 ~]# gluster v create testvol replica 2{1..2} force
Replica 2 volumes are prone to split-brain. Use Arbiter or Replica 3 to avoid this. See:  https://gluster.readthedocs.io/en/latest/Administrator%20Guide/Split%20brain%20and%20ways%20to%20deal%20with%20it/.
Do you still want to continue?

Nag, request you to add this bug to the spreadsheet you created to keep track of the 3.4.0 bugs.

Comment 4 Sunil Kumar Acharya 2017-09-27 09:35:23 UTC
Since patch is there upstream moving to POST state.

Comment 7 Vijay Avuthu 2018-03-15 09:36:12 UTC

Verified with build : glusterfs-server-3.12.2-5.el7rhgs.x86_64

> Able to see warning while creating x2 volume

# gluster vol create 12 replica 2
Replica 2 volumes are prone to split-brain. Use Arbiter or Replica 3 to avoid this. See: http://docs.gluster.org/en/latest/Administrator%20Guide/Split%20brain%20and%20ways%20to%20deal%20with%20it/.
Do you still want to continue?
 (y/n) y
volume create: 12: success: please start the volume to access data

> Didn't see any warnings for below scenario's
    - while converting distribute only to x2
    - while removing bricks from x3 to convert to x2
    - while adding/removing bricks in x2 configurations

Changing status to Verified and will raise new bz for the above scenario's

Comment 9 Srijita Mukherjee 2018-09-03 15:30:57 UTC
Have updated the doc text. Kindly review the technical accuracy.

Comment 10 Karthik U S 2018-09-03 16:06:23 UTC

Comment 12 errata-xmlrpc 2018-09-04 06:35:11 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.