Bug 1234399

Summary: `gluster volume heal <vol-name> split-brain' changes required for entry-split-brain
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Shruti Sampat <ssampat>
Component: replicateAssignee: Ravishankar N <ravishankar>
Status: CLOSED ERRATA QA Contact: Shruti Sampat <ssampat>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: annair, asrivast, atalur, divya, ravishankar, rhs-bugs, storage-qa-internal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.1-13 Doc Type: Bug Fix
Doc Text:
Previously, the split-brain resolution command used to perform conservative merge on directories with both 'bigger- file' and 'source-brick' options. With the fix, for directories, the 'bigger-file' option is disallowed while the 'source-brick' does a conservative merge, informing the user with the appropriate message in both cases.
Story Points: ---
Clone Of:
: 1254167 (view as bug list) Environment:
Last Closed: 2015-10-05 07:14:12 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: 1251815, 1254167, 1256605    

Description Shruti Sampat 2015-06-22 13:21:05 UTC
Description of problem:
------------------------

`gluster volume heal <vol-name> split-brain' command today has 2 arguments: bigger-file and source-brick. 

In case of a directory entry split-brain, the argument bigger-file is not meaningful and should not be accepted. The user needs to be notified that this option cannot be used with directories. Currently, this argument causes entry split-brain to be healed by conservative merge, without any complaints.

For the source-brick argument, the user should be notified that it is conservative merge that will be performed for the directory in question and the heal should happen.

Version-Release number of selected component (if applicable):
--------------------------------------------------------------
glusterfs-3.7.1-3.el6rhs.x86_64

How reproducible:
------------------
Always


Steps to Reproduce:
--------------------
1. On a directory in entry split-brain, run the `gluster volume heal <vol-name> split-brain' command with each of the 2 arguments.

Actual results:
----------------
Heal happens in both cases without notifying the user, as explained in description.

Expected results:
------------------
User should be notified in case the bigger-file argument is used to heal directory entry split-brain, that this is not applicable to directories. In case of source-brick argument, perform conservative merge and notify the user accordingly.

Additional info:

Comment 4 Anuradha 2015-08-18 06:50:42 UTC
Patch posted upstream - http://review.gluster.org/11937/

Comment 6 Shruti Sampat 2015-09-04 11:10:01 UTC
Verified as fixed in glusterfs-3.7.1-14.el7rhgs.x86_64 -

Tested with a volume having a directory in entry split-brain -

# gluster v heal test info
Brick dhcp37-135.lab.eng.blr.redhat.com:/rhs/brick3/b1/
/dir - Is in split-brain

/dir/2 
Number of entries: 2

Brick dhcp37-70.lab.eng.blr.redhat.com:/rhs/brick3/b1/
/dir - Is in split-brain

/dir/1 
Number of entries: 2

Using bigger-file option -

# gluster volume heal test split-brain bigger-file /dir
'bigger-file' not a valid option for directories.
Volume heal failed.

Using source-brick option -

# gluster volume heal test split-brain source-brick 10.70.37.135:/rhs/brick3/b1 /dir                                                                                                         
'source-brick' option used on a directory (/dir). Performing conservative merge.
Healed /dir.

On the client after heal -

# ls dir/
1  2

Comment 8 errata-xmlrpc 2015-10-05 07:14:12 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://rhn.redhat.com/errata/RHSA-2015-1845.html