Bug 1194348
| Summary: | NFS4 - mp,mountpoint option in /etc/exports offers export when it should not while trying to mount it will be hang | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | evets brido <hhocolumbus> |
| Component: | nfs-utils | Assignee: | Steve Dickson <steved> |
| Status: | CLOSED WONTFIX | QA Contact: | Zhi Li <yieli> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | bgoncalv, jiyin, xzhou, yieli, yoyang |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-12-15 07:33:19 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: | |||
|
Description
evets brido
2015-02-19 15:43:55 UTC
(In reply to evets brido from comment #0) > Expected Results: > since /export/share is not a mountpoint, it should not be shared - > according to the man page. - exports(5) > > 1. /export/share should not be listed in output of showmount -e > 2. server:/share should not be mountable by any nfs client Just take a simple test in latest RHEL7. If the directory is exported as "mp" but actually _not_ an mountpoint (yet): - 1. It still can be listed by "showmount -e". - 2. However, the mount operation will be hanged up. # on server side: export dir as "mp" while it's _not_ an mp (yet) [root@nfs_server ~]# cat /etc/exports /export_test *(rw,mountpoint) [root@nfs_server ~]# systemctl restart nfs [root@nfs_server ~]# exportfs -v /export_test <world>(rw,sync,wdelay,hide,no_subtree_check,mountpoint,sec=sys,secure,root_squash,no_all_squash) [root@nfs_server ~]# cat /proc/mounts | grep test [root@nfs_server ~]# # on the client side [root@nfs_client ~]# showmount -e $nfs_server Export list for nfs_server: /export_test * ^^^^^^^^^^^^^^ it can be listed [root@nfs_client ~]# mount -t nfs4 $nfs_server:/export_test /mnt ^C [root@nfs_client ~]# mount -t nfs4 $nfs_server:/export_test /mnt -vvv mount.nfs4: timeout set for Wed Jul 19 03:53:34 2017 mount.nfs4: trying text-based options 'vers=4.1,addr=10.73.194.83,clientaddr=10.73.4.153' ^^^^^^^^^^^^^ mounting hang ^C [root@nfs_client ~]# # on server side: mount the exported dir now [root@nfs_server ~]# mount /tmp/loop.test.image /export_test/ [root@nfs_server ~]# cat /proc/mounts | grep test /dev/loop0 /export_test xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0 [root@nfs_server ~]# # on client side [root@nfs_client ~]# mount -t nfs4 nfs_server.rhts.eng.pek2.redhat.com:/export_test /mnt -vvv mount.nfs4: timeout set for Wed Jul 19 03:54:20 2017 mount.nfs4: trying text-based options 'vers=4.1,addr=10.73.194.83,clientaddr=10.73.4.153' [root@nfs_client ~]# nfsstat -m /mnt from nfs_server.rhts.eng.pek2.redhat.com:/export_test Flags: rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.73.4.153,local_lock=none,addr=10.73.194.83 [root@nfs_client ~]# umount /mnt/ [root@nfs_client ~]# As Bug 1490935 comment #2 says, the export can be showed up. But trying to mount the mount point should get failed. But operation "mount" gets hang in RHEL, which should be a problem. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [root@ ~~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.4 (Maipo) [root@ ~~]# rpm -q nfs-utils nfs-utils-1.3.0-0.48.el7.x86_64 [root@ ~~]# [root@ ~~]# exportfs -i *:/expdir-exportfs_share -o mp [root@ ~~]# exportfs -v /expdir-exportfs_share <world>(ro,sync,wdelay,hide,no_subtree_check,mountpoint,sec=sys,secure,root_squash,no_all_squash) [root@ ~~]# mountpoint /expdir-exportfs_share /expdir-exportfs_share is not a mountpoint [root@ ~~]# showmount -e | grep share /expdir-exportfs_share * [root@ ~~]# timeout 60 mount localhost:/expdir-exportfs_share /mnt/nfsmp-exportfs [root@ ~~]# echo $? 124 ^^^ about "mount" hang for more than 60 seconds Compared with Fedora26: ~~~~~~~~~~~~~~~~~~~~~~ [root@ ~~]# cat /etc/redhat-release Fedora release 26 (Twenty Six) [root@ ~~]# rpm -q nfs-utils nfs-utils-2.1.1-5.rc5.fc26.x86_64 [root@ ~~]# ... [root@ ~~]# mountpoint /expdir-exportfs_share /expdir-exportfs_share is not a mountpoint [root@ ~~]# showmount -e | grep share /expdir-exportfs_share * [root@ ~~]# timeout 60 mount localhost:/expdir-exportfs_share /mnt/nfsmp-exportfs mount.nfs: mounting localhost:/expdir-exportfs_share failed, reason given by server: No such file or directory [root@ ~~]# echo $? 32 Looks like we miss one or more patched with upstream. *** Bug 1401825 has been marked as a duplicate of this bug. *** After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. |