Bug 1379663
Summary: | Volume gets mounted with ganesha v4 mount even when it is unexported. | ||
---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Shashank Raj <sraj> |
Component: | nfs-ganesha | Assignee: | Daniel Gryniewicz <dang> |
Status: | CLOSED ERRATA | QA Contact: | surabhi <sbhaloth> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | rhgs-3.2 | CC: | asrivast, bugs, dang, ffilz, jthottan, kkeithle, mbenjamin, mvignesh, mzywusko, ndevos, rhinduja, rhs-bugs, skoduri, storage-qa-internal |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | RHGS 3.3.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | nfs-ganesha-2.4.4-2 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1365900 | Environment: | |
Last Closed: | 2017-09-21 04:47:57 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: | 1365900 | ||
Bug Blocks: | 1417147 |
Description
Shashank Raj
2016-09-27 11:35:21 UTC
Are you able to list the contents of mount point post unexporting the volume? Steps to reproduce: 1. Mount the volume on client with v4 and do some IO's: root@Client2 ~]# mount -t nfs -o vers=4 10.70.40.209:/testvolume/ /mnt/nfs1 [root@Client2 ~]# df Filesystem 1K-blocks Used Available Use% 10.70.40.209:/testvolume 125107200 236544 124870656 1% /mnt/nfs1 [root@Client2 nfs1]# ls [root@Client2 nfs1]# for i in {1..10}; do mkdir /mnt/nfs1/d$i; for j in {1..10}; do mkdir /mnt/nfs1/d$i/e$j; for k in {1..10}; do touch /mnt/nfs1/d$i/e$j/f$k; done done done [root@Client2 nfs1]# ls d1 d10 d2 d3 d4 d5 d6 d7 d8 d9 2. unmount the volume and unexport it. [root@Client2 ~]# umount /mnt/nfs1 [root@dhcp43-110 ~]# gluster vol set testvolume ganesha.enable off volume set: success [root@dhcp43-110 exports]# pwd /var/run/gluster/shared_storage/nfs-ganesha/exports [root@dhcp43-110 exports]# ls [root@dhcp43-110 exports]# showmount -e localhost Export list for localhost: 3. Mount the same volume again even when it is unexported and observe that it is successful: [root@Client2 ~]# mount -t nfs -o vers=4 10.70.40.209:/testvolume/ /mnt/nfs1 [root@Client2 ~]# 10.70.40.209://testvolume on /mnt/nfs1 type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.70.42.94,local_lock=none,addr=10.70.40.209) 4. Try listing the contents on the mount point and observe that it doesn't list the contents but doesn't give any error as well: [root@Client2 ~]# cd /mnt/nfs1 [root@Client2 nfs1]# ls [root@Client2 nfs1]# ls -a . [root@Client2 nfs1]# ls -ltr total 0 5. Creating a file/dir on mount point fails with read-only file system: [root@Client2 nfs1]# mkdir new mkdir: cannot create directory ‘new’: Read-only file system [root@Client2 nfs1]# touch file touch: cannot touch ‘file’: Read-only file system Thanks Shashank. I think its the result of the pseudo exports support in NFSv4. CCin Frank to confirm that. As it doesn't list any contents I think there is no security breach. Need to check if we can avoid even mount as well. Moving this bug to 3.2.0-beyond for now Hmm, missed this one before. I think it's a problem with cleanup of the PseudoFS, The directory SHOULD have been removed from the PseudoFS on unexport, but I myself have never done unexport testing... Upstream fix: https://review.gerrithub.io/347972 Tried following : 1.Create a ganesha cluster and create a volume. 2.Enable ganesha on the volume and mount it on a client. 3.Mount is successful as expected. 4.Unmount the volume and unexport it. 5.Try mounting the volume back with v4 : Result: Volume doesn't get mounted and gives following error. mount -t nfs -o vers=4 10.70.44.149:/testvol /mnt/nfs mount.nfs: mounting 10.70.44.149:/testvol failed, reason given by server: No such file or directory With version 3 it gives following error: mount -t nfs -o vers=3 10.70.44.149:/testvol /mnt/nfs mount.nfs: access denied by server while mounting 10.70.44.149:/testvol Marking the BZ verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:2779 |