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

Local NFS volumes do not resolve hostnames #26639

Closed
pdevine opened this issue Sep 16, 2016 · 3 comments · Fixed by #27329
Closed

Local NFS volumes do not resolve hostnames #26639

pdevine opened this issue Sep 16, 2016 · 3 comments · Fixed by #27329
Labels
area/volumes kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. status/claimed version/1.12
Milestone

Comments

@pdevine
Copy link

pdevine commented Sep 16, 2016

Description

If you create an NFS volume using the local storage driver, you have to use the IP address of the NFS host. If you use the host name, your container will fail to start and will return "docker: Error response from daemon: invalid argument."

Steps to reproduce the issue:

  1. create an NFS server and export a directory
  2. create a docker volume using "docker volume create -o type=nfs -o o=addr=my_host,rw -o device=:/exports --name foo"
  3. start a container mounting that volume with "docker run -it --rm -v foo:/storage alpine sh"

Describe the results you received:

$ docker run -it -v foo:/storage alpine sh
docker: Error response from daemon: invalid argument.

Describe the results you expected:

If you use it with an IP address you get:
$ docker run -it -v foo:/storage alpine sh
/ # ls /storage/
docker

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: 23cf638
Built: Thu Aug 18 05:33:38 2016
OS/Arch: linux/amd64

Server:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: 23cf638
Built: Thu Aug 18 05:33:38 2016
OS/Arch: linux/amd64

Output of docker info:

Containers: 11
Running: 10
Paused: 0
Stopped: 1
Images: 45
Server Version: 1.12.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 99
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: host bridge null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-22-generic
Operating System: Ubuntu 16.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 975.1 MiB
Name: clone13
ID: VCBT:FE4P:AA65:W5NF:53RX:7D7U:MECQ:G2IQ:EP23:MVWQ:DCGC:MAA7
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Cluster Store: etcd://192.168.36.247:12379
Cluster Advertise: 192.168.36.247:12376
Insecure Registries:
127.0.0.0/8

Additional environment details (AWS, VirtualBox, physical, etc.):

This is using VMware Fusion. The NFS server is the standard one packaged with Ubuntu 16.04.

@justincormack
Copy link
Contributor

Yes, the local driver simply passes the arguments to the mount syscall, and does not know specifically about nfs at present. I think someone was looking into this.

@cpuguy83 cpuguy83 added area/volumes kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. labels Sep 16, 2016
@dattatrayakumbhar
Copy link
Contributor

#dibs I would like to work on this issue.

@thaJeztah
Copy link
Member

Thanks @dattatrayakumbhar04

dattatrayakumbhar pushed a commit to dattatrayakumbhar/docker that referenced this issue Nov 8, 2016
Signed-off-by: dattatrayakumbhar04 <dattatraya.kumbhar@gslab.com>
justincormack added a commit that referenced this issue Nov 9, 2016
…ith_hostname

#26639: Local NFS volumes do not resolve hostnames
@thaJeztah thaJeztah added this to the 1.13.0 milestone Nov 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/volumes kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. status/claimed version/1.12
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants