Bug 1161066

Summary: A disperse 2 x (2 + 1) = 6 volume, kill two glusterfsd program, ls mountpoint abnormal.
Product: [Community] GlusterFS Reporter: jiademing.dd <iesool>
Component: disperseAssignee: Xavi Hernandez <jahernan>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: bugs, gluster-bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1162805 (view as bug list) Environment:
Last Closed: 2015-01-28 14:27:13 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: 1162805    
Bug Blocks: 1163723    

Description jiademing.dd 2014-11-06 10:22:05 UTC
Description of problem:
In a disperse 2 x (2 + 1) = 6 volume, kill two glusterfsd program, then ls mountpoint abnormal.for example:

ls /mnt/test/
s0  s0 s1  s2  s2  s3  s4  s4


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

How reproducible:


Steps to Reproduce:
1.
Volume Name: test
Type: Distributed-Disperse
Volume ID: efa68313-7476-46fd-b47d-478c5348f92c
Status: Started
Number of Bricks: 2 x (2 + 1) = 6
Transport-type: tcp
Bricks:
Brick1: 10.10.101.111:/sda
Brick2: 10.10.101.111:/sdb
Brick3: 10.10.101.111:/sdc
Brick4: 10.10.101.111:/sdd
Brick5: 10.10.101.111:/sde
Brick6: 10.10.101.111:/sdf
2. create many files and directorys in mountpoint.
3.kill brick5 and brick6
4.ls mountpoint abnormal.

Actual results:
ls /mnt/test/
s0  s0 s1  s2  s2  s3  s4  s4

Expected results:
ls /mnt/test/
s0 s1  s2  s3 s4

Additional info:

Comment 1 Anand Avati 2014-11-12 17:37:31 UTC
REVIEW: http://review.gluster.org/9107 (ec: Fix return errors when not enough bricks) posted (#1) for review on release-3.6 by Xavier Hernandez (xhernandez)

Comment 2 Anand Avati 2014-11-18 16:40:58 UTC
REVIEW: http://review.gluster.org/9107 (ec: Fix return errors when not enough bricks) posted (#2) for review on release-3.6 by Xavier Hernandez (xhernandez)

Comment 3 Anand Avati 2014-12-03 16:01:29 UTC
REVIEW: http://review.gluster.org/9107 (ec: Fix return errors when not enough bricks) posted (#4) for review on release-3.6 by Xavier Hernandez (xhernandez)

Comment 4 Anand Avati 2014-12-13 06:10:59 UTC
COMMIT: http://review.gluster.org/9107 committed in release-3.6 by Raghavendra Bhat (raghavendra) 
------
commit ceaa61bef43749f9ae8290a1fbe630aab9ed5943
Author: Xavier Hernandez <xhernandez>
Date:   Tue Nov 11 18:45:01 2014 +0100

    ec: Fix return errors when not enough bricks
    
    Changes introduced by this patch:
    
    * Fix an incorrect error propagation when the state of the life
      cycle of a fop returns an error.
    
    * Fix incorrect unlocking of failed locks.
    
    * Return ENOTCONN if there aren't enough bricks online.
    
    * In readdir(p) check that the fd has been successfully open by
      a previous opendir.
    
    This is a backport of http://review.gluster.org/9098/
    
    Change-Id: Ib44f25a1297849ebcbab839332f3b6359f275ebe
    BUG: 1161066
    Signed-off-by: Xavier Hernandez <xhernandez>
    Reviewed-on: http://review.gluster.org/9107
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Dan Lambright <dlambrig>
    Reviewed-by: Raghavendra Bhat <raghavendra>
    Tested-by: Raghavendra Bhat <raghavendra>