Bug 790781

Summary: nfs: deletion of files/directory not happening from windows machine
Product: [Community] GlusterFS Reporter: Saurabh <saujain>
Component: nfsAssignee: Vivek Agarwal <vagarwal>
Status: CLOSED CURRENTRELEASE QA Contact: Saurabh <saujain>
Severity: medium Docs Contact:
Priority: medium    
Version: pre-releaseCC: gluster-bugs, mzywusko, sankarshan, vagarwal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 18:02:50 UTC Type: ---
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:    
Bug Blocks: 817967    

Description Saurabh 2012-02-15 11:40:34 UTC
Description of problem:

This issue was reported by a community user and now we have reproduced the issue in-house. 

  The problem is that the files and directory deletion does not happen from windows machine. 


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

How reproducible:
always

Steps to Reproduce:
1.setup nfs windows client
2.make some dirs and files
3.try to remove them
  
Actual results:
deletion fails

Expected results:
the deletion should succeed

Additional info:
copying users mail:-

Hi,

We couldn't delete any files and directories when connecting glusterfs to windows via NFS.
We could make/change files and directories.
Although it has written that glusterfs can be connected with windows NFS client in the page shown below.
Any ideas to workaround/fix this ?

http://docs.redhat.com/docs/en-US/Red_Hat_Storage_Software_Appliance/3.2/html/User_Guide/chap-Administration_Guide-GlusterFS_Client.html

ENVIRONMENT:
OS: RHEL6 x86_64
GlusterFS: 3.2.5
Windows OS: Windows2008R2
Windows NFS ver: NFSv3

We tried to solve this problem with Microsoft.
We captured network traffic between NFS server and NFS client.
Access call is sent to NFS server from NFS client before sending delete call.
We found that glusterfs has returnd 'not allow (ACCESS3_DELETE=0)' to the access call.
In the case that glusterfs is connected to linux via NFS, linux NFS client is deleting files and directories by ignoring 'not allow (ACCESS3_DELETE=0)'.
However, windows NFS client does not ignore 'not allow (ACCESS3_DELETE=0)' and does not try to files and directories.

Our research summary:
NFS server NFS client responce to access call
gluster NFS server <-> windows NFS client Not Allow Delete (can't delete any files and directories)
gluster NFS server <-> linux NFS client Not Allow Delete (can delete files and directories by ignoring responce to access call)
linux NFS server <-> windows NFS client Allow Delete (can delete files and directories)

We took captures of network traffic on three cases.
Summary of the captures to access call are below for reference.

--Captures (gluster NFS server<->  windows NFS client)--
No.     Time                       Source                SourcePort Destination           DestPort Protocol Info
   1079 2011-12-22 19:39:37.586504 10.129.0.145          946        10.129.0.60           38467    NFS      V3 ACCESS Call (Reply In 1080), FH:0xc306b6b5
Network File System, ACCESS Call FH:0xc306b6b5
    [Program Version: 3]
    [V3 Procedure: ACCESS (4)]
    object
    access: 0x10
        .... .0 = not allow READ
        .... 0. = not allow LOOKUP
        ...0 .. = not allow MODIFY
        ..0. .. = not allow EXTEND
        .1.. .. = allow DELETE
        0... .. = not allow EXECUTE

No.     Time                       Source                SourcePort Destination           DestPort Protocol Info
   1080 2011-12-22 19:39:37.587195 10.129.0.60           38467      10.129.0.145          946      NFS      V3 ACCESS Reply (Call In 1079)
Network File System, ACCESS Reply
    [Program Version: 3]
    [V3 Procedure: ACCESS (4)]
    Status: NFS3_OK (0)
    obj_attributes
    access: 0x00
        .... .0 = not allow READ
        .... 0. = not allow LOOKUP
        ...0 .. = not allow MODIFY
        ..0. .. = not allow EXTEND
        .0.. .. = not allow DELETE
        0... .. = not allow EXECUTE
---------------------------------

--Captures (gluster NFS server<->  linux NFS client)--

No.     Time                       Source                SourcePort Destination           DestPort Protocol Info
     11 2011-12-27 18:58:48.628804 10.201.0.121          859        10.201.0.14           38467    NFS      V3 ACCESS Call (Reply In 12), FH:0x4aa48fe2
Network File System, ACCESS Call FH:0x4aa48fe2
    [Program Version: 3]
    [V3 Procedure: ACCESS (4)]
    object
    access: 0x1f
        .... .1 = allow READ
        .... 1. = allow LOOKUP
        ...1 .. = allow MODIFY
        ..1. .. = allow EXTEND
        .1.. .. = allow DELETE
        0... .. = not allow EXECUTE

No.     Time                       Source                SourcePort Destination           DestPort Protocol Info
     12 2011-12-27 18:58:48.630107 10.201.0.14           38467      10.201.0.121          859      NFS      V3 ACCESS Reply (Call In 11)
Network File System, ACCESS Reply
    [Program Version: 3]
    [V3 Procedure: ACCESS (4)]
    Status: NFS3_OK (0)
    obj_attributes  Directory mode:0755 uid:0 gid:0
    access: 0x0f
        .... .1 = allow READ
        .... 1. = allow LOOKUP
        ...1 .. = allow MODIFY
        ..1. .. = allow EXTEND
        .0.. .. = not allow DELETE
        0... .. = not allow EXECUTE
-------------------------------

--Captures (linux NFS server<->  windows NFS client)--

No.     Time                       Source                SourcePort Destination           DestPort Protocol Info
     11 2011-12-27 18:58:48.628804 10.201.0.121          859        10.201.0.14           38467    NFS      V3 ACCESS Call (Reply In 12), FH:0x4aa48fe2
Network File System, ACCESS Call FH:0x4aa48fe2
    [Program Version: 3]
    [V3 Procedure: ACCESS (4)]
    object
    access: 0x1f
        .... .1 = allow READ
        .... 1. = allow LOOKUP
        ...1 .. = allow MODIFY
        ..1. .. = allow EXTEND
        .1.. .. = allow DELETE
        0... .. = not allow EXECUTE

No.     Time                       Source                SourcePort Destination           DestPort Protocol Info
     12 2011-12-27 18:58:48.630107 10.201.0.14           38467      10.201.0.121          859      NFS      V3 ACCESS Reply (Call In 11)
Network File System, ACCESS Reply
    [Program Version: 3]
    [V3 Procedure: ACCESS (4)]
    Status: NFS3_OK (0)
    obj_attributes  Directory mode:0755 uid:0 gid:0
    access: 0x0f
        .... .1 = allow READ
        .... 1. = allow LOOKUP
        ...1 .. = allow MODIFY
        ..1. .. = allow EXTEND
        .0.. .. = not allow DELETE
        0... .. = not allow EXECUTE
--------------------------------------------

Comment 1 Rajesh 2012-03-06 07:42:56 UTC
fix ready for 3.2.5 but Windows client currently cannot mount 3.3qa24 or mainline version gNfs

Comment 2 Anand Avati 2012-03-10 09:11:40 UTC
CHANGE: http://review.gluster.com/2875 (nfs/server: allow deletion of files by default) merged in master by Vijay Bellur (vijay)

Comment 3 Anand Avati 2012-03-18 07:36:45 UTC
CHANGE: http://review.gluster.com/2872 (nfs/server: allow deletion of files by default) merged in release-3.2 by Anand Avati (avati)

Comment 4 Saurabh 2012-05-16 10:57:23 UTC
tried this on win7 and the bug is not seen anymore