Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1374581 - Geo-rep worker Faulty with OSError: [Errno 21] Is a directory
Summary: Geo-rep worker Faulty with OSError: [Errno 21] Is a directory
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: geo-replication
Version: 3.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Aravinda VK
QA Contact:
URL:
Whiteboard:
Depends On: 1365791
Blocks: 1374579
TreeView+ depends on / blocked
 
Reported: 2016-09-09 06:50 UTC by Aravinda VK
Modified: 2016-12-06 05:59 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.9.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1365791
Environment:
Last Closed: 2016-12-06 05:59:10 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Aravinda VK 2016-09-09 06:50:16 UTC
+++ This bug was initially created as a clone of Bug #1365791 +++

Description of problem:
During rename if Source and destination exists with same inode then Geo-rep sends unlink for the source. Geo-rep is failing with EISDIR error during unlink

Traceback (most recent call last):
  File "/usr/libexec/glusterfs/python/syncdaemon/repce.py", line 113, in worker
    res = getattr(self.obj, rmeth)(*in_data[2:])
  File "/usr/libexec/glusterfs/python/syncdaemon/resource.py", line 772, in entry_ops
    os.unlink(entry)
OSError: [Errno 21] Is a directory: '.gfid/12711ebf-7fdc-4f4b-9850-2d75581eb452/New folder'

--- Additional comment from Vijay Bellur on 2016-08-10 04:42:33 EDT ---

REVIEW: http://review.gluster.org/15132 (geo-rep: Handle EISDIR error during Unlink) posted (#1) for review on master by Aravinda VK (avishwan@redhat.com)

--- Additional comment from Worker Ant on 2016-08-25 04:17:56 EDT ---

REVIEW: http://review.gluster.org/15132 (geo-rep: Handle EISDIR error during Unlink) posted (#2) for review on master by Aravinda VK (avishwan@redhat.com)

--- Additional comment from Worker Ant on 2016-08-29 02:40:13 EDT ---

REVIEW: http://review.gluster.org/15132 (geo-rep: Handle EISDIR error during Unlink) posted (#3) for review on master by Aravinda VK (avishwan@redhat.com)

--- Additional comment from Worker Ant on 2016-09-08 12:16:08 EDT ---

COMMIT: http://review.gluster.org/15132 committed in master by Aravinda VK (avishwan@redhat.com) 
------
commit 8a6236e4cfc7bf86e881e5c770a19040a6060ad0
Author: Aravinda VK <avishwan@redhat.com>
Date:   Wed Aug 10 14:02:09 2016 +0530

    geo-rep: Handle EISDIR error during Unlink
    
    During Rename, If Source and Target has same inode then
    Geo-rep unlinks source. But if source is a directory then
    this will fail with below traceback
    
    Traceback (most recent call last):
      File "/usr/libexec/glusterfs/python/syncdaemon/repce.py", line 113, in worker
        res = getattr(self.obj, rmeth)(*in_data[2:])
      File "/usr/libexec/glusterfs/python/syncdaemon/resource.py", line 772,
        in entry_ops
        os.unlink(entry)
    OSError: [Errno 21] Is a directory: '.gfid/12711ebf-7fdc-4f4b-9850-2d75581eb
       452/New folder'
    
    With this patch, if EISDIR, rmdir is tried. Logs error in Slave log in case
    of ENOTEMPTY.
    
    BUG: 1365791
    Change-Id: I099af4192adac5125c0a23988ceb6506f91e987f
    Signed-off-by: Aravinda VK <avishwan@redhat.com>
    Reviewed-on: http://review.gluster.org/15132
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Kotresh HR <khiremat@redhat.com>

Comment 1 Worker Ant 2016-09-09 06:52:30 UTC
REVIEW: http://review.gluster.org/15435 (geo-rep: Handle EISDIR error during Unlink) posted (#1) for review on release-3.9 by Aravinda VK (avishwan@redhat.com)

Comment 2 Worker Ant 2016-09-09 06:56:00 UTC
REVIEW: http://review.gluster.org/15435 (geo-rep: Handle EISDIR error during Unlink) posted (#2) for review on release-3.9 by Aravinda VK (avishwan@redhat.com)

Comment 3 Worker Ant 2016-09-15 06:28:08 UTC
COMMIT: http://review.gluster.org/15435 committed in release-3.9 by Aravinda VK (avishwan@redhat.com) 
------
commit d401607625769ce3254cfe6e383b1bc027868c85
Author: Aravinda VK <avishwan@redhat.com>
Date:   Wed Aug 10 14:02:09 2016 +0530

    geo-rep: Handle EISDIR error during Unlink
    
    During Rename, If Source and Target has same inode then
    Geo-rep unlinks source. But if source is a directory then
    this will fail with below traceback
    
    Traceback (most recent call last):
      File "/usr/libexec/glusterfs/python/syncdaemon/repce.py", line 113, in worker
        res = getattr(self.obj, rmeth)(*in_data[2:])
      File "/usr/libexec/glusterfs/python/syncdaemon/resource.py", line 772,
        in entry_ops
        os.unlink(entry)
    OSError: [Errno 21] Is a directory: '.gfid/12711ebf-7fdc-4f4b-9850-2d75581eb
       452/New folder'
    
    With this patch, if EISDIR, rmdir is tried. Logs error in Slave log in case
    of ENOTEMPTY.
    
    > Reviewed-on: http://review.gluster.org/15132
    > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    > CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    > Smoke: Gluster Build System <jenkins@build.gluster.org>
    > Reviewed-by: Kotresh HR <khiremat@redhat.com>
    
    BUG: 1374581
    Change-Id: I099af4192adac5125c0a23988ceb6506f91e987f
    Signed-off-by: Aravinda VK <avishwan@redhat.com>
     (cherry picked from commit 8a6236e4cfc7bf86e881e5c770a19040a6060ad0)
    Change-Id: Ic3fcf3fa3c049c0d820db86b93e04f6e239deb45
    Reviewed-on: http://review.gluster.org/15435
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>

Comment 4 Aravinda VK 2016-10-27 05:22:55 UTC
glusterfs-3.9.0rc2 is released[1] and packages are available for different distributions[2] to test.

[1] http://www.gluster.org/pipermail/maintainers/2016-October/001601.html
[2] http://www.gluster.org/pipermail/maintainers/2016-October/001605.html and http://www.gluster.org/pipermail/maintainers/2016-October/001606.html

Comment 5 Aravinda VK 2016-12-06 05:59:10 UTC
Gluster 3.9 GA is released http://blog.gluster.org/2016/11/announcing-gluster-3-9/


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