Bug 1163416

Summary: [USS]: From NFS, unable to go to .snaps directory (error: No such file or directory)
Product: [Community] GlusterFS Reporter: Vijaikumar Mallikarjuna <vmallika>
Component: snapshotAssignee: Manikandan <mselvaga>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, rabhat, rhinduja, rjoseph, smohan, storage-qa-internal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: USS
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1159302
: 1303865 1316096 (view as bug list) Environment:
Last Closed: 2016-06-16 12:40:24 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:
Bug Depends On: 1159302, 1160621    
Bug Blocks: 1303865, 1316096    

Comment 1 Anand Avati 2014-11-12 16:43:12 UTC
REVIEW: http://review.gluster.org/9106 (gluster/uss: change ctime attribute of a directory when USS enabled) posted (#1) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 2 Vijay Bellur 2016-02-02 09:17:08 UTC
REVIEW: http://review.gluster.org/9106 (gluster/uss: change ctime attr of a dir when USS enabled) posted (#2) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 3 Vijaikumar Mallikarjuna 2016-02-02 09:28:52 UTC
There are two problem mentioned in the bug description.
Problem 1) 
If the current directory '/dir' is not a part of the snapshot say 'snap1', then the user cannot enter the '/dir/.snaps/snap1' directory.
This is an expected behavior and not a bug

Problem 2)
Consider a testcase:
 mount -t nfs host1:/vol1 /mnt
 ls /mnt
 ls /mnt/.snaps (As expected this fails)
 gluster volume set vol1 features.uss enable
Now `ls /mnt/.snaps` should work, but fails with No such file or
directory.
This is because NFS client  and Kernel VFS caches the list of files in a
directory.
This cache is updated if there are any changes in the directory attributes.

This problem will be fixed by patch: http://review.gluster.org/9106

Comment 4 Vijay Bellur 2016-03-10 10:44:31 UTC
COMMIT: http://review.gluster.org/9106 committed in master by Rajesh Joseph (rjoseph) 
------
commit ed98d128a9413f7b8af328ca27bf4b27514d61e9
Author: vmallika <vmallika>
Date:   Tue Feb 2 14:34:19 2016 +0530

    gluster/uss: change ctime attr of a dir when USS enabled
    
    Consider a testcase:
     mount -t nfs host1:/vol1 /mnt
     ls /mnt
     ls /mnt/.snaps (As expected this fails)
     gluster volume set vol1 features.uss enable
    
    Now `ls /mnt/.snaps` should work, but fails with No such file or
    directory.
    This is because NFS client  and Kernel VFS caches the list of files in a
    directory.
    This cache is updated if there are any changes in the directory attributes.
    
    This patch solves the problem by changing ctime attribute when USS is
    enabled
    
    Change-Id: I48b284100d0589f1c0285782a1302080c15d4e1f
    BUG: 1163416
    Signed-off-by: vmallika <vmallika>
    Reviewed-on: http://review.gluster.org/9106
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Rajesh Joseph <rjoseph>

Comment 7 Niels de Vos 2016-06-16 12:40:24 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user