Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFS VolumeStore FQDN not working #8043

Closed
alatdev opened this issue Jun 12, 2018 · 3 comments · Fixed by #8244
Closed

NFS VolumeStore FQDN not working #8043

alatdev opened this issue Jun 12, 2018 · 3 comments · Fixed by #8244
Assignees
Labels
component/isos component/tether help wanted kind/defect Behavior that is inconsistent with what's intended severity/4-minor Low usability or functional impact. Often has an easy workaround. source/customer Reported by a customer, directly or via an intermediary

Comments

@alatdev
Copy link

alatdev commented Jun 12, 2018

VIC version:

1.4.0

Deployment details:

What was the vic-machine create command used to deploy the VCH?
vic-machine-windows create --name lvte11 --container-name-convention lvte11_{name} --compute-resource vmcl01 --image-store vmfs12_vmcl01 --base-image-size 8GB --volume-store vmfs12_vmcl01:vsphere --volume-store vmfs12_vmcl01:default --bridge-network lvte11-bridge --bridge-network-range 172.16.0.0/12 --public-network 10.10.x.x --public-network-ip 10.10.1.236/16 --public-network-gateway 10.10.0.10 --dns-server 10.1.44.40 --container-network 10.10.x.x:10.10.x.x --container-network-ip-range 10.10.x.x:10.10.2.230-10.10.2.235 --container-network-gateway 10.10.x.x:10.10.0.10/16 --container-network-dns 10.10.x.x:10.1.44.40 --container-network-firewall 10.10.x.x:published --tls-cname lvte11 --certificate-key-size 2048 --tls-ca Land_Salzburg_Trust_Sub-04_CA.crt --user xxx --thumbprint xxx --target lvvm02.land-sbg.gv.at --registry-ca registry_ca.crt --ops-user xxx --affinity-vm-group --volume-store nfs://lvte24.land-sbg.gv.at/lvte11:nfs

Steps to reproduce:
docker volume create --opt VolumeStore=nfs --name test_ubuntu
docker run -it -v test_ubuntu:/mnt/test --net=10.10.x.x lvte05.land-sbg.gv.at/default-project/alpine:latest

Actual behavior:
When using FQDN to the NFS-Share, the container won't start. I cannot set a DNS-Search-List.
docker: Error response from daemon: Server error from portlayer: unable to wait for process launch status: container VM has unexpectedly powered off.

If I use the IP address, it works.

Expected behavior:
Container can reach NFS Share by FQDN.

Logs:

container-logs_fqdn_notworking.zip

bug2104495

@hickeng hickeng added kind/defect Behavior that is inconsistent with what's intended component/container-base component/tether source/customer Reported by a customer, directly or via an intermediary priority/p2 help wanted labels Jun 13, 2018
@hickeng
Copy link
Member

hickeng commented Jun 13, 2018

The error showing in the tether.debug file for the containerVM is:

Jun 12 2018 14:35:17.917Z ERROR mounting nfs://lvte24.land-sbg.gv.at/lvte11/volumes/test_ubuntu on /mnt/test failed: invalid argument

I have not confirmed, but believe that the mount syscall should be passed an IP address and not an unresolved name.

Approaches:

  1. resolve the name in containerVM at boot time
  2. resolve in the endpointVM when the container is created
  3. resolve in endpointVM, add to container as hint, and use dns files resolution order in container.

If chosing (1) or (2) please open a follow up issue for (3).

(1) adds a dependency on a correctly configured and responsive DNS server that knows of the FQND on all container-networks.

(3) can be achieved by a change to config OR fixing #4716 and being explicit about our resolver priorities (dns file instead of the default file dns) for this one lookup. @gigawhitlocks has knowledge of the built in Go resolver logic.

Starting point hint for (1):

rawSource.WriteString(source.Hostname())

@zjs zjs added component/isos severity/4-minor Low usability or functional impact. Often has an easy workaround. and removed component/isos/container priority/p2 labels Jul 30, 2018
YanzhaoLi added a commit to YanzhaoLi/vic that referenced this issue Aug 30, 2018
When docker using a nfs VolumeStore as a volume, the mount
action will fail if the nfs-server url is a FQDN. A dotted
ip url works well. When the linux syscall
mount(source, target, flag, mountOptions) using for nfs
mount, its mountOptions should contain 'addr=serverip' and
the serverip must be an ip(ps. the url in source is useless).

Thus the fix resolve the FQDN and give its mountOptions the
'addr=ip'. The mountOptions is generated as 'addr=host' at
CreateMountSpec when creating the endpointVM. The fix choose
to do the resolve just before the mounting action.

Resolve: vmware#8043
YanzhaoLi added a commit to YanzhaoLi/vic that referenced this issue Sep 4, 2018
When docker using a nfs VolumeStore as a volume, the mount
action will fail if the nfs-server url is a FQDN. A dotted
ip url works well. When the linux syscall
mount(source, target, flag, mountOptions) using for nfs
mount, its mountOptions should contain 'addr=serverip' and
the serverip must be an ip(ps. the url in source is useless).

Thus the fix resolve the FQDN and give its mountOptions the
'addr=ip'. The mountOptions is generated as 'addr=host' at
CreateMountSpec when creating the endpointVM. The fix choose
to do the resolve just before the mounting action.

Resolve: vmware#8043
YanzhaoLi added a commit to YanzhaoLi/vic that referenced this issue Nov 2, 2018
When docker using a nfs VolumeStore as a volume, the mount
action will fail if the nfs-server url is a FQDN. A dotted
ip url works well. When the linux syscall
mount(source, target, flag, mountOptions) using for nfs
mount, its mountOptions should contain 'addr=serverip' and
the serverip must be an ip(ps. the url in source is useless).

Thus the fix resolve the FQDN and give its mountOptions the
'addr=ip'. The mountOptions is generated as 'addr=host' at
CreateMountSpec when creating the endpointVM. The fix choose
to do the resolve just before the mounting action.

Resolve: vmware#8043
YanzhaoLi added a commit to YanzhaoLi/vic that referenced this issue Nov 5, 2018
When docker using a nfs VolumeStore as a volume, the mount
action will fail if the nfs-server url is a FQDN. A dotted
ip url works well. When the linux syscall
mount(source, target, flag, mountOptions) using for nfs
mount, its mountOptions should contain 'addr=serverip' and
the serverip must be an ip(ps. the url in source is useless).

Thus the fix resolve the FQDN and give its mountOptions the
'addr=ip'. The mountOptions is generated as 'addr=host' at
CreateMountSpec when creating the endpointVM. The fix choose
to do the resolve just before the mounting action.

Resolve: vmware#8043
YanzhaoLi added a commit to YanzhaoLi/vic that referenced this issue Nov 21, 2018
When docker using a nfs VolumeStore as a volume, the mount
action will fail if the nfs-server url is a FQDN. A dotted
ip url works well. When the linux syscall
mount(source, target, flag, mountOptions) using for nfs
mount, its mountOptions should contain 'addr=serverip' and
the serverip must be an ip(ps. the url in source is useless).

Thus the fix resolve the FQDN and give its mountOptions the
'addr=ip'. The mountOptions is generated as 'addr=host' at
CreateMountSpec when creating the endpointVM. The fix choose
to do the resolve just before the mounting action.

Resolve: vmware#8043
YanzhaoLi added a commit to YanzhaoLi/vic that referenced this issue Nov 21, 2018
When docker using a nfs VolumeStore as a volume, the mount
action will fail if the nfs-server url is a FQDN. A dotted
ip url works well. When the linux syscall
mount(source, target, flag, mountOptions) using for nfs
mount, its mountOptions should contain 'addr=serverip' and
the serverip must be an ip(ps. the url in source is useless).

Thus the fix resolve the FQDN and give its mountOptions the
'addr=ip'. The mountOptions is generated as 'addr=host' at
CreateMountSpec when creating the endpointVM. The fix choose
to do the resolve just before the mounting action.

Resolve: vmware#8043
YanzhaoLi added a commit to YanzhaoLi/vic that referenced this issue Nov 22, 2018
When docker using a nfs VolumeStore as a volume, the mount
action will fail if the nfs-server url is a FQDN. A dotted
ip url works well. When the linux syscall
mount(source, target, flag, mountOptions) using for nfs
mount, its mountOptions should contain 'addr=serverip' and
the serverip must be an ip(ps. the url in source is useless).

Thus the fix resolve the FQDN and give its mountOptions the
'addr=ip'. The mountOptions is generated as 'addr=host' at
CreateMountSpec when creating the endpointVM. The fix choose
to do the resolve just before the mounting action.

Resolve: vmware#8043
YanzhaoLi added a commit to YanzhaoLi/vic that referenced this issue Nov 22, 2018
When docker using a nfs VolumeStore as a volume, the mount
action will fail if the nfs-server url is a FQDN. A dotted
ip url works well. When the linux syscall
mount(source, target, flag, mountOptions) using for nfs
mount, its mountOptions should contain 'addr=serverip' and
the serverip must be an ip(ps. the url in source is useless).

Thus the fix resolve the FQDN and give its mountOptions the
'addr=ip'. The mountOptions is generated as 'addr=host' at
CreateMountSpec when creating the endpointVM. The fix choose
to do the resolve just before the mounting action.

Resolve: vmware#8043
YanzhaoLi added a commit to YanzhaoLi/vic that referenced this issue Nov 26, 2018
When docker using a nfs VolumeStore as a volume, the mount
action will fail if the nfs-server url is a FQDN. A dotted
ip url works well. When the linux syscall
mount(source, target, flag, mountOptions) using for nfs
mount, its mountOptions should contain 'addr=serverip' and
the serverip must be an ip(ps. the url in source is useless).

Thus the fix resolve the FQDN and give its mountOptions the
'addr=ip'. The mountOptions is generated as 'addr=host' at
CreateMountSpec when creating the endpointVM. The fix choose
to do the resolve just before the mounting action.

Resolve: vmware#8043
@zjs
Copy link
Member

zjs commented Dec 14, 2018

@stuclem: Could we consider retroactively adding this to the release notes or docs for 1.4? (context)

YanzhaoLi added a commit that referenced this issue Dec 17, 2018
* Fix NFS VolumeStore FQDN not working

When docker using a nfs VolumeStore as a volume, the mount action will fail if the nfs-server url is a FQDN. A dotted ip url works well. When the linux syscall mount(source, target, flag, mountOptions) using for nfs mount, its mountOptions should contain 'addr=serverip' and the serverip must be an ip(ps. the url in source is useless).

Thus the fix resolve the FQDN and give its mountOptions the 'addr=ip'. The mountOptions is generated as 'addr=host' at CreateMountSpec when creating the endpointVM. The fix choose
to do the resolve just before the mounting action.

Resolve: #8043
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/isos component/tether help wanted kind/defect Behavior that is inconsistent with what's intended severity/4-minor Low usability or functional impact. Often has an easy workaround. source/customer Reported by a customer, directly or via an intermediary
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants