Bug 1657176

Summary: rm -rf during rebalance operation fails on few dirs with ENOTEMPTY
Product: Red Hat Gluster Storage Reporter: Sayalee <saraut>
Component: distributeAssignee: Nithya Balachandran <nbalacha>
Status: CLOSED NOTABUG QA Contact: Sayalee <saraut>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.4CC: nbalacha, rhs-bugs, storage-qa-internal
Target Milestone: ---Keywords: 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: Environment:
Last Closed: 2019-11-20 10:18:51 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: 1678183    

Description Sayalee 2018-12-07 11:03:21 UTC
Description of problem:
When rebalance operation is in progress (in this case, due to remove brick operation), performing an rm -rf from mount point leaves few directories undeleted with 'ENOTEMPTY' error

Version-Release number of selected component (if applicable):
3.12.2-31

How reproducible:
1/1

Steps to Reproduce:
1. create a dist-rep (4x2) volume
2. run linux untar operation frm fuse mount
3. run remove-brick to remove 2x2 bricks from gluster server and rm -rf * from the mount
4. rm -rf on few directories failed with 'ENOTEMPTY'

[root@dhcp41-226 vol3]# cd dir2
[root@dhcp41-226 dir2]# rm -rf *
rm: cannot remove ‘linux-4.6.4/arch/arm’: Directory not empty
[root@dhcp41-226 dir2]# rm -rf *
rm: cannot remove ‘linux-4.6.4/arch’: Directory not empty
[root@dhcp41-226 dir2]# rm -rf *
rm: cannot remove ‘linux-4.6.4/arch/frv/include/asm’: Directory not empty
[root@dhcp41-226 dir2]# rm -rf *
rm: cannot remove ‘linux-4.6.4/arch’: Directory not empty
[root@dhcp41-226 dir2]# rm -rf *
rm: cannot remove ‘linux-4.6.4/arch/mips/include/asm’: Directory not empty

Actual results:
rm -rf failed with 'Directory not empty'

Expected results:
ENOTEMPTY error should not be seen

Additional info:
Sosreports will be provided