Bug 1115379 - "rm -rf *" from multiple mount points fails on certain directories with message "Is a directory"
Summary: "rm -rf *" from multiple mount points fails on certain directories with messa...
Keywords:
Status: CLOSED DUPLICATE of bug 999496
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: distribute
Version: rhgs-3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Raghavendra G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-02 09:19 UTC by spandura
Modified: 2014-07-18 14:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-18 14:50:53 UTC
Embargoed:


Attachments (Terms of Use)

Description spandura 2014-07-02 09:19:27 UTC
Description of problem:
=========================
In a distribute-replicate volume when 'rm -rf *' is performed from multiple mounts, On some directories rm -rf fails with message "rm: cannot remove `A482/B3/C9': Is a directory" 

Unlink call is sent on the directory rather than "rmdir"

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

Version-Release number of selected component (if applicable):
==============================================================
glusterfs 3.6.0.22 built on Jun 23 2014 10:33:07

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

Steps to Reproduce:
====================
1. Create distribute-replicate volume. Start the volume.

2. Create 2 fuse mounts and 2 nfs mount or all 4 fuse mounts. 

3. Create directories ( mkdir -p A{1..1000}/B{1..20}/C{1..20} )

4. From all the mount points execute "rm -rf *"

Actual results:
=================
root@dj [Jul-02-2014- 1:13:53] >rm -rf *
rm: cannot remove `A11': Directory not empty
rm: cannot remove `A111': Directory not empty
rm: cannot remove `A137': Directory not empty
rm: cannot remove `A151/B18': Directory not empty
rm: cannot remove `A153': Directory not empty
rm: cannot remove `A163': Directory not empty
rm: cannot remove `A204': Directory not empty
rm: cannot remove `A480/B16': Directory not empty
rm: cannot remove `A480/B17/C10': Is a directory
rm: cannot remove `A481/B15': Directory not empty
rm: cannot remove `A481/B19': Directory not empty
rm: cannot remove `A481/B5': Directory not empty
rm: cannot remove `A481/B14': Directory not empty
rm: cannot remove `A482/B3/C9': Is a directory

Expected results:
==================
unlink call shouldn't be sent on directories. 

Additional info:
==================
ls -l on that directory is returning "No Such File or Directory"

root@dj [Jul-02-2014- 1:52:45] >ls -l A482/B3/C9
ls: cannot access A482/B3/C9: No such file or directory

root@mia [Jul-02-2014-14:42:57] >gluster v info rep
 
Volume Name: rep
Type: Distributed-Replicate
Volume ID: d8d69cec-8bdd-4c9d-b5f5-972b36716b0b
Status: Started
Snap Volume: no
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: rhs-client11:/rhs/device0/rep_brick1
Brick2: rhs-client12:/rhs/device0/rep_brick2
Brick3: rhs-client13:/rhs/device0/rep_brick3
Brick4: rhs-client14:/rhs/device0/rep_brick4
Options Reconfigured:
features.uss: disable
server.statedump-path: /var/run/gluster/statedumps
features.barrier: disable
performance.readdir-ahead: on
snap-max-hard-limit: 256
snap-max-soft-limit: 90
auto-delete: disable
root@mia [Jul-02-2014-14:43:01] >
root@mia [Jul-02-2014-14:43:02] >gluster v status rep
Status of volume: rep
Gluster process						Port	Online	Pid
------------------------------------------------------------------------------
Brick rhs-client11:/rhs/device0/rep_brick1		49154	Y	2890
Brick rhs-client12:/rhs/device0/rep_brick2		49154	Y	5472
Brick rhs-client13:/rhs/device0/rep_brick3		49153	Y	2869
Brick rhs-client14:/rhs/device0/rep_brick4		49153	Y	5433
NFS Server on localhost					2049	Y	32441
Self-heal Daemon on localhost				N/A	Y	27961
NFS Server on rhs-client13				2049	Y	20245
Self-heal Daemon on rhs-client13			N/A	Y	2858
NFS Server on 10.70.36.35				2049	Y	20399
Self-heal Daemon on 10.70.36.35				N/A	Y	2885
NFS Server on rhs-client12				2049	Y	11226
Self-heal Daemon on rhs-client12			N/A	Y	5494
NFS Server on rhs-client14				2049	Y	11211
Self-heal Daemon on rhs-client14			N/A	Y	5455
 
Task Status of Volume rep
------------------------------------------------------------------------------
There are no active volume tasks
 
root@mia [Jul-02-2014-14:43:05] >

Comment 3 Raghavendra G 2014-07-03 04:57:24 UTC
strace showed that an unlinkat (without REMOVEDIR flag) was sent on a directory and unlinkat failed with EISDIR.

Comment 4 Vivek Agarwal 2014-07-03 06:22:19 UTC
per discussion, not a blocker

Comment 5 Rachana Patel 2014-07-18 14:50:53 UTC

*** This bug has been marked as a duplicate of bug 999496 ***


Note You need to log in before you can comment on or make changes to this bug.