Bug 1118311
| Summary: | After enabling nfs.mount-udp mounting server:/volume/subdir fails | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Niels de Vos <ndevos> | ||||
| Component: | nfs | Assignee: | Niels de Vos <ndevos> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||
| Severity: | high | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | mainline | CC: | gluster-bugs, vagarwal | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | glusterfs-3.7.0 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1118359 (view as bug list) | Environment: | |||||
| Last Closed: | 2015-05-14 17:26:15 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: | |||||||
| Bug Blocks: | 1118359, 1124789 | ||||||
| Attachments: |
|
||||||
|
Description
Niels de Vos
2014-07-10 12:17:55 UTC
mountudpproc3_mnt_3_svc() invokes nfs3_rootfh() which internally calls mnt3_mntpath_to_export() to resolve the path. mnt3_mntpath_to_export() just works if the mount path requested is volume itself. It does not resolve if the path is a subdir inside the volume. I think nfs3_rootfh() needs to invoke something like mnt3_find_export() which would resolve volume and subdir. I ll test the fix before sending the patch out for review. Created attachment 919888 [details]
Fix
This needs a bit of testing.
REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#1) for review on master by Santosh Pradhan (spradhan) REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#2) for review on master by Santosh Pradhan (spradhan) REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#3) for review on master by Santosh Pradhan (spradhan) *** Bug 1031166 has been marked as a duplicate of this bug. *** *** Bug 1031164 has been marked as a duplicate of this bug. *** REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#4) for review on master by Santosh Pradhan (spradhan) REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#5) for review on master by Santosh Pradhan (spradhan) REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#6) for review on master by Santosh Pradhan (spradhan) REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#7) for review on master by Santosh Pradhan (spradhan) REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#8) for review on master by Santosh Pradhan (spradhan)
I am done with all the changes, code review is pending, snippet of change:
gNFS: Subdir mount does not work on UDP proto
After enabling nfs.mount-udp, mounting a subdir on a volume over
NFS fails. Because mountudpproc3_mnt_3_svc() invokes nfs3_rootfh()
which internally calls mnt3_mntpath_to_export() to resolve the
mount path. mnt3_mntpath_to_export() just works if the mount path
requested is volume itself. It is not able to resolve, if the path
is a subdir inside the volume.
MOUNT over TCP uses mnt3_find_export() to resolve subdir path but
UDP can't use this routine because mnt3_find_export() needs the
req data (of type rpcsvc_request_t) and it's available only for
TCP version of RPC.
FIX:
(1) Use syncop_lookup() framework to resolve the MOUNT PATH by
breaking it into components and resolve component-by-component.
(2) If MOUNT PATH is subdir, then make sure subdir export is not
disabled.
(3) Add auth mechanism to respect nfs.rpc-auth-allow/reject and
subdir auth i.e. nfs.export-dir
(4) Enhanced error handling for MOUNT over UDP
REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#9) for review on master by Santosh Pradhan (spradhan) REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#10) for review on master by Santosh Pradhan (spradhan) REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#11) for review on master by Santosh Pradhan (spradhan) REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#12) for review on master by Santosh Pradhan (spradhan) REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#13) for review on master by Santosh Pradhan (spradhan) REVIEW: http://review.gluster.org/8346 (gNFS: Subdir mount does not work on UDP proto) posted (#14) for review on master by Santosh Pradhan (spradhan) COMMIT: http://review.gluster.org/8346 committed in master by Niels de Vos (ndevos) ------ commit ddb31110db8e1b5995d392ced988f34d2f9145d2 Author: Santosh Kumar Pradhan <spradhan> Date: Tue Jul 22 16:56:57 2014 +0530 gNFS: Subdir mount does not work on UDP proto After enabling nfs.mount-udp, mounting a subdir on a volume over NFS fails. Because mountudpproc3_mnt_3_svc() invokes nfs3_rootfh() which internally calls mnt3_mntpath_to_export() to resolve the mount path. mnt3_mntpath_to_export() just works if the mount path requested is volume itself. It is not able to resolve, if the path is a subdir inside the volume. MOUNT over TCP uses mnt3_find_export() to resolve subdir path but UDP can't use this routine because mnt3_find_export() needs the req data (of type rpcsvc_request_t) and it's available only for TCP version of RPC. FIX: (1) Use syncop_lookup() framework to resolve the MOUNT PATH by breaking it into components and resolve component-by-component. i.e. glfs_resolve_at () API from libgfapi shared object. (2) If MOUNT PATH is subdir, then make sure subdir export is not disabled. (3) Add auth mechanism to respect nfs.rpc-auth-allow/reject and subdir auth i.e. nfs.export-dir (4) Enhanced error handling for MOUNT over UDP Change-Id: I42ee69415d064b98af4f49773026562824f684d1 BUG: 1118311 Signed-off-by: Santosh Kumar Pradhan <spradhan> Reviewed-on: http://review.gluster.org/8346 Reviewed-by: soumya k <skoduri> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Niels de Vos <ndevos> 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.7.0, please open a new bug report. glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user 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.7.0, please open a new bug report. glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user 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.7.0, please open a new bug report. glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user 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.7.0, please open a new bug report. glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user |