Bug 1361182 - vdsm does not find nfs4 mount point with double slashes
Summary: vdsm does not find nfs4 mount point with double slashes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: 4.18.6
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ovirt-4.0.4
: 4.18.12
Assignee: Idan Shaby
QA Contact: Kevin Alon Goldblatt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-28 12:59 UTC by wodel
Modified: 2016-09-26 12:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Previously, we didn't support NFS4 mounts that contained a double slash, like in the case of trying to mount an NFS4 directory that is exported with the fsid=0 option. Now it's possible to do that.
Clone Of:
Environment:
Last Closed: 2016-09-26 12:41:11 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
rule-engine: devel_ack+
acanan: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 61578 0 master MERGED fileUtils: Normalize initial double slashes 2016-08-01 20:54:02 UTC
oVirt gerrit 61579 0 master MERGED mount: Support NFS4 mounts with double slash 2016-08-01 20:54:08 UTC
oVirt gerrit 61580 0 ovirt-4.0 MERGED fileUtils: Normalize initial double slashes 2016-08-16 20:14:00 UTC
oVirt gerrit 61581 0 ovirt-4.0 MERGED mount: Support NFS4 mounts with double slash 2016-08-16 20:14:10 UTC

Description wodel 2016-07-28 12:59:38 UTC
Description of problem:

When using nfs4 with fsid=0 to change the root of the exported directories, the mounted share is displayed with double slashes, i.e
nfsserver # cat /etc/exports
/home/ovirt             *(fsid=0,rw,....)
/home/ovirt/engine_vm   *(rw,....)

hypervisor # mount -t nfs4 nfsserver.domain.tld:/engine_vm /mnt
hypervisor # df -h
nfsserver.domain.tld://engine_vm          656G    111G  513G  18% /mnt

even the mount command shows the double slashes.
hypervisor # cat /proc/mount
...
nfsserver.domain.tld://engine_vm on /rhev/data-center/mnt/nfsserver.domain.tld:_engine__vm type nfs4 (rw,relatime,vers=4.0,...)


When the hosted-engine --deploy is started, I get this error when using the above mount point (nfsserver.domain.tld:/engine_vm)
Failed to execute stage 'Environment customization': Connection to storage server failed

After some digging in vdsm logs, I found that vdsm searches for :
OSError: [Errno 2] Mount of `nfsserver.domain.tld:/engine_vm` at `/rhev/data-center/mnt/nfsserver.domain.tld:_engine__vm` does not exist

I think that vdsm can't find the mount point because of the double slashes.

Version-Release number of selected component (if applicable):

OS : Fedora 23
oVirt : 4.0.1
vdsm-4.18.6-1.fc23.x86_64
Storage : nfs4 with fsid=0

How reproducible:
always

Steps to Reproduce:
1.configure nfs4 storage with fsid=0 to hide the root export.
2.install ovirt-hosted-engine-setup and start the deployment.
3.use the nfs4 export for the engine's storage

Actual results:
[ ERROR ] Failed to execute stage 'Environment customization': Connection to storage server failed

Expected results:
The mount is executed successfully.

Additional info:

Comment 1 Allon Mureinik 2016-08-08 13:00:35 UTC
This is pretty visible. Idan, please add some doctext.

Comment 2 Allon Mureinik 2016-08-10 08:21:35 UTC
Oops, the needinfo was intended for Idan, not Wodel. My apologies.

Comment 3 Nir Soffer 2016-08-10 15:09:29 UTC
This needs a backport to 4.0. I believe this is a regression introduced in 
https://gerrit.ovirt.org/55182.

Comment 4 Idan Shaby 2016-08-16 08:04:18 UTC
Please review the backports - patches 61580 and 61581.
Thanks

Comment 5 Kevin Alon Goldblatt 2016-09-11 13:29:15 UTC
Tested with the following code:
----------------------------------------
rhevm-4.0.4-0.1.el7ev.noarch
vdsm-4.18.12-1.el7ev.x86_64

Tested with the following scenario:

Steps to Reproduce:
1. Created an nfs mount as follows:

cat /etc/exports
/home/ovirt             *(fsid=0,rw,....)
/home/ovirt/engine_vm   *(rw,....)

hypervisor # mount -t nfs4 nfsserver.domain.tld:/engine_vm /mnt
hypervisor # df -h
nfsserver.domain.tld://engine_vm          656G    111G  513G  18% /mnt

even the mount command shows the double slashes.
hypervisor # cat /proc/mount
...
nfsserver.domain.tld://engine_vm on /rhev/data-center/mnt/nfsserver.domain.tld:_engine__vm type nfs4 (rw,relatime,vers=4.0,...)Actual results:
The first disk is now marked as bootable by default

2. Deployed the hosted engine installer and enterd the 

When the hosted-engine --deploy is started, I get NO error when using the above mount point (nfsserver.domain.tld:/engine_vm) and the storage domain is created successfully as part of a successful HE deployment


Expected results:



Moving to VERIFIED!


Note You need to log in before you can comment on or make changes to this bug.