Bug 1006354

Summary: No error is reported when files are in extended-attribute split-brain state.
Product: Red Hat Gluster Storage Reporter: spandura
Component: glusterfsAssignee: Ravishankar N <ravishankar>
Status: CLOSED ERRATA QA Contact: spandura
Severity: high Docs Contact:
Priority: medium    
Version: 2.1CC: grajaiya, nsathyan, pkarampu, psriniva, ravishankar, rhs-bugs, vbellur
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 2.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0.35.1u2rhs-1 Doc Type: Bug Fix
Doc Text:
Previously, files were not checked if they were in a split-brain state before proceeding with certain file operations. As a result no errors were reported on these file operations. With this update, if a file is in split-brain state, the file operation returns I/O error (EIO) to the application.
Story Points: ---
Clone Of:
: 1010834 (view as bug list) Environment:
Last Closed: 2014-02-25 07:38:09 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: 1010834    

Description spandura 2013-09-10 13:36:26 UTC
Description of problem:
==========================
Getting extended attributes of files which are in extended-attibute split-brain succeeds . Extended attributes are read from any of the brick in the replica pair. 

Version-Release number of selected component (if applicable):
============================================================
glusterfs 3.4.0.33rhs built on Sep  8 2013 13:20:26

How reproducible:
==================
Often

Steps to Reproduce:
======================
1. Create 1 x 2 replicate volume. Set "self-heal-daemon" to "off". Start the volume. 

2. Create a fuse mount. Create a file from fuse mount. "touch a"

3. Bring down brick-1.

4. Set an extended attribute on the file from mount point: 
setfattr -n trusted.mdata -v "testing_1" a

5. Bring back brick-1. Immediately brink down brick-2. 

6.  Set an extended attribute on the file from mount point: 
setfattr -n trusted.mdata -v "testing_2" a

7. Bring back brick-2. 

8. From mount point get the extended attribute set. "getfattr -d -e hex -m . a"

Actual results:
===================
root@darrel [Sep-10-2013-13:32:23] >touch a
root@darrel [Sep-10-2013-13:32:25] >setfattr -n trusted.mdata -v "testing_1" a
root@darrel [Sep-10-2013-13:33:02] >setfattr -n trusted.mdata -v "testing_2" a
root@darrel [Sep-10-2013-13:33:24] >getfattr -d -e hex -m . a
# file: a
trusted.mdata=0x74657374696e675f32

Expected results:
=================
Error message to report split-brain state . 

++++++++++++++++++++++++++++++++++++++++
Brick-1 extended attribute of file a:
+++++++++++++++++++++++++++++++++++++++++
root@fan [Sep-10-2013-13:33:38] >getfattr -d -e hex -m . /rhs/bricks/vol_dis_1_rep_2_b0/a
getfattr: Removing leading '/' from absolute path names
# file: rhs/bricks/vol_dis_1_rep_2_b0/a
trusted.afr.vol_dis_1_rep_2-client-0=0x000000000000000000000000
trusted.afr.vol_dis_1_rep_2-client-1=0x000000000000000100000000
trusted.gfid=0x18a007de01c4421a9a0a263d1a147587
trusted.mdata=0x74657374696e675f31

++++++++++++++++++++++++++++++++++++++++
Brick-2 extended attribute of file a:
+++++++++++++++++++++++++++++++++++++++++
root@mia [Sep-10-2013-13:33:38] >getfattr -d -e hex -m . /rhs/bricks/vol_dis_1_rep_2_b1/a
getfattr: Removing leading '/' from absolute path names
# file: rhs/bricks/vol_dis_1_rep_2_b1/a
trusted.afr.vol_dis_1_rep_2-client-0=0x000000000000000100000000
trusted.afr.vol_dis_1_rep_2-client-1=0x000000000000000000000000
trusted.gfid=0x18a007de01c4421a9a0a263d1a147587
trusted.mdata=0x74657374696e675f32

Comment 2 Ravishankar N 2013-10-17 07:15:57 UTC
Downstream patch @ https://code.engineering.redhat.com/gerrit/#/c/14169/

Comment 3 spandura 2013-12-30 04:38:24 UTC
Verified this fix on the build "glusterfs 3.4.0.52rhs built on Dec 19 2013 12:20:16" with the steps specified in the description. Bug is fixed. Moving the bug to verified state.

Comment 4 Pavithra 2014-01-03 04:46:05 UTC
Can you please verify this doc text and ensure its technically correct?

Comment 5 Ravishankar N 2014-01-03 06:40:54 UTC
LGTM

Comment 7 errata-xmlrpc 2014-02-25 07:38:09 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.

http://rhn.redhat.com/errata/RHEA-2014-0208.html