Bug 1298555

Summary: Deletion of directory is failing with Directory not empty as request is going to brick which is not having files
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: RajeshReddy <rmekala>
Component: replicateAssignee: Pranith Kumar K <pkarampu>
Status: CLOSED DUPLICATE QA Contact: storage-qa-internal <storage-qa-internal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: mzywusko, nsathyan, ravishankar, rhs-bugs, storage-qa-internal
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-28 06:56: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:
Embargoed:

Description RajeshReddy 2016-01-14 12:33:21 UTC
Description of problem:
=================
Deletion of directory is failing with Directory not empty as request is going to brick which is not having files 


Version-Release number of selected component (if applicable):
============
glusterfs-server-3.7.5-15


How reproducible:


Steps to Reproduce:
=================
1. After running automated script (which creates files and kill sub-vol and then do fops like rename,modify and then run the self-heal) 
2. After that tired rm -rf * on the mount but deletion of one directory failing with  Directory not empty
3. Only one brick has directory and files and another brick has only directory and there is no xattrs set on the file 
4. Request is going to the brick which doesn't have files so deletion is failing 

Actual results:


Expected results:


Additional info:
===========
Mounted afr2x2_tier on transformers @/mnt/glusterfs

[root@vertigo ~]# gluster vol info afr2x2_tier
 
Volume Name: afr2x2_tier
Type: Tier
Volume ID: a490af06-7ab2-47c0-b1ad-b565ee713aed
Status: Started
Number of Bricks: 8
Transport-type: tcp
Hot Tier :
Hot Tier Type : Distributed-Replicate
Number of Bricks: 2 x 2 = 4
Brick1: ninja.lab.eng.blr.redhat.com:/rhs/brick1/afr2x2_tier_hot12
Brick2: vertigo.lab.eng.blr.redhat.com:/rhs/brick1/afr2x2_tier_hot2
Brick3: ninja.lab.eng.blr.redhat.com:/rhs/brick1/afr2x2_tier_hot1
Brick4: vertigo.lab.eng.blr.redhat.com:/rhs/brick1/afr2x2_tier_hot1
Cold Tier:
Cold Tier Type : Distributed-Replicate
Number of Bricks: 2 x 2 = 4
Brick5: vertigo.lab.eng.blr.redhat.com:/rhs/brick3/afr2x2_tier_cold_1
Brick6: ninja.lab.eng.blr.redhat.com:/rhs/brick3/afr2x2_tier_cold_1
Brick7: vertigo.lab.eng.blr.redhat.com:/rhs/brick2/afr2x2_tier_cold_2
Brick8: ninja.lab.eng.blr.redhat.com:/rhs/brick2/afr2x2_tier_cold_2
Options Reconfigured:
cluster.tier-mode: cache
features.ctr-enabled: on
performance.readdir-ahead: on
cluster.data-self-heal-algorithm: diff

File present on one of the brick
===========

[root@ninja old]# pwd
/rhs/brick3/afr2x2_tier_cold_1/old
[root@ninja old]# ls -lrth /rhs/brick3/afr2x2_tier_cold_1/old
total 0
---------T. 2 root root 0 Jan 11 23:50 E_file_15
[root@ninja old]# getfattr -d -m . -e hex E_file_15
# file: E_file_15
security.selinux=0x73797374656d5f753a6f626a6563745f723a676c7573746572645f627269636b5f743a733000
trusted.afr.afr2x2_tier-client-0=0x000000010000000200000000
trusted.afr.dirty=0x000000000000000000000000
trusted.gfid=0x82123d63b05b4949b9c9f8abd7ed2478
trusted.tier.tier-dht.linkto=0x6166723278325f746965722d686f742d64687400

File doen't present on the replica brick
============
/rhs/brick3/afr2x2_tier_cold_1/old
[root@vertigo old]# ls -lrth /rhs/brick3/afr2x2_tier_cold_1/old
total 0