Bug 1561457

Summary: [CephFS:FSAL_CEPH]:cannot list contents of a snapshot without ganesha restart
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Ramakrishnan Periyasamy <rperiyas>
Component: CephFSAssignee: Jeff Layton <jlayton>
Status: CLOSED NEXTRELEASE QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 3.0CC: ceph-eng-bugs, ffilz, jlayton, pasik, pdonnell, rperiyas, rraja
Target Milestone: rcKeywords: Reopened
Target Release: 4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1429347 Environment:
Last Closed: 2019-05-30 17:09: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:
Embargoed:
Bug Depends On: 1429347    
Bug Blocks:    
Attachments:
Description Flags
ganehsa conf used in downstream steup none

Description Ramakrishnan Periyasamy 2018-03-28 11:37:36 UTC
+++ This bug was initially created as a clone of Bug #1429347 +++

Description of problem:
From a NFSv4 client, after creating a snapshot [1] of a share served by CephFS/Ganesha backend, cannot list the contents of the snapshot. Need to restart the ganesha server, and remount (umount + mount) the share to be able to list the contents of the snapshot.

[1] http://docs.ceph.com/docs/master/dev/cephfs-snapshots/
 
Version-Release number of selected component (if applicable):
NFS-Ganesha (source-install using next branch)
V2.5-dev-16, commit SHA1 17808ba522fdd9e42747e6

Ceph, libcephfs (master branch)
12.0.0-957-gf1ae21b-1xenial, commit SHA1 f1ae21b

How reproducible:
Always

Steps to Reproduce:

1. Mount a share served by Ganesha with Ceph FSAL using NFSv4 client.
   Turned off ganesha's directory caching and attribute caching, and NFS client caching (actimeo=0).

$ sudo cat /etc/ganesha/ganesha.conf
 CACHE_INODE {
     Attr_Expiration_Time = 0;
     Dir_Max = 1;
}

EXPORT {
    
    CLIENT {
        Clients = 10.0.2.15;
        Access_Type = rw;
    }

    SecType = sys;
    Pseudo = /volumes/_nogroup/543c7074-1210-4c12-945d-3fcb78935fc5;
    Squash = None;
    
    FSAL {
        Name = CEPH;
        User_Id = "ganesha";
        Secret_Access_Key = "AQCMarhYXl//GRAAgSWMDPnN4sMgevCHZP/Xfw==";
    }
    
    Tag = share-543c7074-1210-4c12-945d-3fcb78935fc5;
    Path = /volumes/_nogroup/543c7074-1210-4c12-945d-3fcb78935fc5;
    Export_Id = 102;
    

}

$  sudo mount.nfs -o vers=4,rw,actimeo=0 10.0.2.15:/volumes/_nogroup/543c7074-1210-4c12-945d-3fcb78935fc5 /mnt/nfs4/
   
2. Create files in the share.
$ cd /mnt/nfs4/
$ touch file{0..10}

3. Create a snapshot by creating a dir in the hidden .snap folder within the share.
$ mkdir .snap/snap42

4. List contents of the snapshot. Unable to see the snapshot contents.
$ ls .snap/snap42

5. Restart the ganesha server, and remount (umount + mount) the share.

6. Now list the snapshot folder. You should be able to see the snapshot contents.


Actual results:
Cannot list contents of the snapshot without restarting the ganesha server,
and remounting share.

Expected results:
Don't need a ganesha server restart and share remount to see snapshot contents.

Additional info:

Comment 4 Ramakrishnan Periyasamy 2018-03-28 12:01:18 UTC
Created attachment 1414144 [details]
ganehsa conf used in downstream steup

ganehsa conf used in downstream steup

Comment 12 Ramakrishnan Periyasamy 2020-10-12 10:21:39 UTC
Clearing the needinfo as the problem is not reproduced and bz in closed state.