Bug 1417198

Summary: Automatic Splitbrain with size as policy must not resolve splitbrains when both the copies are of same size
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Nag Pavan Chilakam <nchilaka>
Component: replicateAssignee: Pranith Kumar K <pkarampu>
Status: CLOSED WONTFIX QA Contact: Nag Pavan Chilakam <nchilaka>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.2CC: amukherj, ksubrahm, pkarampu, ravishankar, rhs-bugs, spamecha, storage-qa-internal
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1655049 1655052 (view as bug list) Environment:
Last Closed: 2018-11-16 05:49:26 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: 1304593, 1655049, 1655052    

Description Nag Pavan Chilakam 2017-01-27 13:55:59 UTC
Description of problem:
=====================
In a 1x2 volume I notice that when we set the favorite child policy as size, and if a file is in split brain with both the files of same size, the 1st brick is always becoming the source and healing the file 
The only case this doesnt happen is for a zero byte file


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

How reproducible:
=======
always

Steps to Reproduce:
1. create a 1x2 volume and set favorite child policy to size
2. have 2 cleints such that c1 can ping only b1 and c2 only b2
3.now from c1 create a file f1
4. perform manual heal or force heal by issuing heal command so that f1 is synced to b2 also
5. now from c1 type below: 
   echo "abc" >>f1
  from c2 type below:
   echo "cab" >>f1
6. now the files will be seen in split brain
6. trigger heal manually or wait for heal to complete.

we can see that inspite of both the files being of same size the file on b1 is always made the source and healed.

I don't know if that is because of client side quorum code, which takes the b1 as the default brick in an even replica pair and only exactly 50% are pingable

Note for zero byte files, if we create metadata splitbrains and trigger heal with size as favorite policy, the heal doesnt resolve.

expected results:
=======
automatic resolution with size as policy must not resolve splitbrains when size is same

Comment 9 Sheetal Pamecha 2018-11-13 05:59:57 UTC
Hi Ravi,

Iraj and I have taken respective bugs 1417426 and 1417402 and have been working on them. We decided to work on one bug at a time and will take on rest bugs as we finish these.