for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

NFS Kubernetes Volume mount in Docker 2.4.0.0

Open zamu87 opened this issue 6 years ago • 9 comments

  • [x] I have tried with the latest version of my channel (Stable or Edge)
  • [ ] I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

mount a NFS volume in Kubernetes without errors as in 2.3.0.5

Actual behavior

NFS volume mount fails with following error:

  Warning  FailedMount  10m (x6 over 12m)  kubelet, docker-desktop  MountVolume.SetUp failed for volume "app-data" : mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs host.docker.internal:/System/Volumes/Data/Users/Stefano/Workspace/project/deploy /var/lib/kubelet/pods/4456b490-81c3-4985-b3e5-2ef3bc5d2dbc/volumes/kubernetes.io~nfs/app-data
Output: mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to k

Information

  • Is it reproducible? Yes, every time you deploy a kubernetes template with NFS volume
  • Is the problem new? Yes, it works on version 2.3.0.5
  • Did the problem appear with an update? Yes, after 2.4.0.0 update
  • macOS Version: 10.15.7

Diagnostic logs

Docker for Mac: version 1.4.0.0 with enabled Kubernetes support

Steps to reproduce the behavior

  1. Install Docker Desktop for Mac 2.4.0.0
  2. Enable Kubernetes
  3. Enable NFS server on local system and export the folders you need
  4. Deploy the following template in kubernetes using kubectl apply -f
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-nfs
  labels:
    app: test-nfs
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test-nfs
  template:
    metadata:
      labels:
        app: test-nfs
    spec:
      containers:
        - name: test
          image: bash
          args: [ "/bin/bash", "-c", "while true; do sleep 30; done;" ]
          volumeMounts:
            - name: app-data
              mountPath: "/app"
      volumes:
        - name: app-data
          nfs:
            server: "host.docker.internal"
            path: "/System/Volumes/Data/Users/Stefano/Workspace/project/deploy"

zamu87 avatar Oct 01 '20 15:10 zamu87

@zamu87 Are you using gRPC FUSE or osxfs for file sharing? The setting is under Preferences > General.

@stephen-turner This looks like it could be the same issue as #4957 but under Kubernetes. Pretty sure rpc.statd is part of gRPC and the error says it is not running...

doublesharp avatar Oct 01 '20 17:10 doublesharp

@doublesharp I’m using gRPG FUSE as default setting

zamu87 avatar Oct 01 '20 17:10 zamu87

@zamu87 And does the bug go away if you switch back to osxfs?

stephen-turner avatar Oct 01 '20 18:10 stephen-turner

@stephen-turner I've disabled gRPC FUSE but the bug is still there, the error is the same:

Output: mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: Protocol not supported

zamu87 avatar Oct 02 '20 07:10 zamu87

With my team we all have the same issue, exactly as described by @zamu87 Same setup, it worked before the update, does not since 2.4.0.0, same error message, tried with and without gRPC enabled

igoooor avatar Oct 02 '20 09:10 igoooor

Thanks, investigating.

stephen-turner avatar Oct 02 '20 10:10 stephen-turner

The issue has been fixed in Edge release 2.4.2.0, thank you for reporting it.

simonferquel avatar Oct 19 '20 08:10 simonferquel

I am not sure if this is related, but there is an issue with mounted files inside mounted folders on Docker Desktop 25.0.0, see comment here https://github.com/moby/moby/issues/40109#issuecomment-725042440 and more details here https://stackoverflow.com/questions/64784250/docker-desktop-version-25-0-0-breaks-mounting-of-volumes-inside-mounted-folders/64784251#64784251

marcelovani avatar Nov 11 '20 10:11 marcelovani

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked

docker-robott avatar Dec 11 '20 03:12 docker-robott