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

mounting nfs volumes in pods is broken #35718

Closed
sjenning opened this issue Oct 27, 2016 · 3 comments
Closed

mounting nfs volumes in pods is broken #35718

sjenning opened this issue Oct 27, 2016 · 3 comments
Assignees

Comments

@sjenning
Copy link
Contributor

sjenning commented Oct 27, 2016

#35652 broke mounting nfs volumes in pods:

apiVersion: v1
kind: Pod
metadata:
  name: demo
spec:
  containers:
  - image: fedora:24
    name: fedora
    imagePullPolicy: Always
    command:
    - /usr/bin/sleep
    - "3600"
    volumeMounts:
    - name: myvol
      mountPath: /mnt
  volumes:
  - name: myvol
    nfs:
      path: /srv/share
      server: localhost
  terminationGracePeriodSeconds: 5

kubectl create -f nfspod.yaml

Stuck in ContainerCreating

kubectl describe pod demo

Events:
  FirstSeen LastSeen    Count   From            SubObjectPath   Type        Reason      Message
  --------- --------    -----   ----            -------------   --------    ------      -------
  14s       14s     1   {default-scheduler }            Normal      Scheduled   Successfully assigned demo to 127.0.0.1
  14s       6s      5   {kubelet 127.0.0.1}         Warning     FailedMount MountVolume.SetUp failed for volume "kubernetes.io/nfs/3cc8bac7-9c77-11e6-ae11-fa163e815edd-myvol" (spec.Name: "myvol") pod "3cc8bac7-9c77-11e6-ae11-fa163e815edd" (UID: "3cc8bac7-9c77-11e6-ae11-fa163e815edd") with: mount failed: exit status 32
Mounting command: mount
Mounting arguments: /localhost:/srv/share /var/lib/kubelet/pods/3cc8bac7-9c77-11e6-ae11-fa163e815edd/volumes/kubernetes.io~nfs/myvol nfs []
Output: mount.nfs: Failed to resolve server /localhost: Name or service not known

Note the leading / on the nfs server name.

@vishh @derekwaynecarr

@vishh
Copy link
Contributor

vishh commented Oct 27, 2016

7fd03c4 should fix this. Sorry for the trouble.

@vishh vishh self-assigned this Oct 27, 2016
@sjenning
Copy link
Contributor Author

sjenning commented Oct 27, 2016

@vishh ah yes, I had a PR with that fix ready to go but you beat me to it. Minus the whole else case there since the if before it ends in a return. Thanks! I'll close when it merged

@HJFinch
Copy link

HJFinch commented Jan 29, 2017

Hey there,
the NFS Mount still seams unable to resolve service host names (service.namespace) on GCE.
Is this issue fixed and merged or does it still take some time for it to be fixed on GCE?

MountVolume.SetUp failed for volume "kubernetes.io/nfs/***" (spec.Name: "***") pod "***" (UID: "***") with: mount failed: exit status 32 Mounting command: mount Mounting arguments: nfs-server:/exports/jenkins-master /var/lib/kubelet/pods/***/volumes/kubernetes.io~nfs/jenkins-master nfs [] Output: mount.nfs: Failed to resolve server nfs-server.storage: Name or service not known

The DNS seems to work properly as running containers are able to resolve the name. Also using the IP works as well but is no solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants