kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.41k stars 4.88k forks source link

`minikube mount` doesn't work with clusters launched with the xhyve driver #1452

Closed boosh closed 6 years ago

boosh commented 7 years ago

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Minikube version (use minikube version): v0.18.0

Environment:

What happened: minikube mount doesn't share any files or directories into a minikube cluster launched with the xhyve driver on OSX.

What you expected to happen: It would share files into the cluster.

How to reproduce it (as minimally and precisely as possible):

Anything else do we need to know: No

aaron-prindle commented 7 years ago

Can you post the output of minikube mount --v=9 $(pwd)?

boosh commented 7 years ago

Sure, here it is:

Mounting /Users/me/projects/clients/my-service into /mount-9p on the minikubeVM
This daemon process needs to stay alive for the mount to still be accessible...
Found binary path at /usr/local/bin/docker-machine-driver-xhyve
Launching plugin server for driver xhyve
ufs starting
Plugin server listening at address 127.0.0.1:52625
() DBG | operation not supported by device
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(minikube) Calling .GetSSHHostname
(minikube) Calling .GetSSHPort
(minikube) Calling .GetSSHKeyPath
(minikube) Calling .GetSSHKeyPath
(minikube) Calling .GetSSHUsername
Using SSH client type: external
Using SSH private key: /Users/me/.minikube/machines/minikube/id_rsa (-rw-------)
&{[-F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none docker@192.168.64.7 -o IdentitiesOnly=yes -i /Users/me/.minikube/machines/minikube/id_rsa -p 22] /usr/bin/ssh <nil>}
About to run SSH command:

sudo umount /mount-9p;
sudo rm -rf /mount-9p;

SSH cmd err, output: <nil>: umount: /mount-9p: not mounted

(minikube) Calling .GetSSHHostname
(minikube) Calling .GetSSHPort
(minikube) Calling .GetSSHKeyPath
(minikube) Calling .GetSSHKeyPath
(minikube) Calling .GetSSHUsername
Using SSH client type: external
Using SSH private key: /Users/me/.minikube/machines/minikube/id_rsa (-rw-------)
&{[-F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none docker@192.168.64.7 -o IdentitiesOnly=yes -i /Users/me/.minikube/machines/minikube/id_rsa -p 22] /usr/bin/ssh <nil>}
About to run SSH command:

sudo mkdir /mount-9p;
sudo mount -t 9p -o trans=tcp -o port=5640 -o uid=1001 -o gid=1001 192.168.64.1 /mount-9p;
sudo chmod 775 /mount-9p;
aaron-prindle commented 7 years ago

@boosh are you still experiencing this error? We have released a few bug fixes to mount since then. I don't see anything obvious from the logs, can you verify that xhyve is using the 192.168.64.1 network interface? Also can you check that the directory is mounted by running minikube ssh -- mount | grep 9p?

boosh commented 7 years ago

@aaron-prindle I've just confirmed this still affects minikube v0.19.1. The directory is mounted:

$ minikube ssh -- mount | grep 9p
host on /Users type 9p (rw,relatime,sync,dirsync,version=9p2000,trans=virtio,uname=me,dfltuid=1000,dfltgid=50,access=any)

And I've confirmed it's still using that network interface:

$ minikube mount --v=9 $(pwd):/mount-9p
Found binary path at /usr/local/bin/docker-machine-driver-xhyve
Launching plugin server for driver xhyve
Plugin server listening at address 127.0.0.1:62423
() DBG | operation not supported by device
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(minikube) Calling .DriverName
Mounting /Users/me/projects/clients/my-service into /mount-9p on the minikubeVM
This daemon process needs to stay alive for the mount to still be accessible...
ufs starting
Found binary path at /usr/local/bin/docker-machine-driver-xhyve
Launching plugin server for driver xhyve
Plugin server listening at address 127.0.0.1:62428
() DBG | operation not supported by device
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(minikube) Calling .GetSSHHostname
(minikube) Calling .GetSSHPort
(minikube) Calling .GetSSHKeyPath
(minikube) Calling .GetSSHKeyPath
(minikube) Calling .GetSSHUsername
Using SSH client type: external
Using SSH private key: /Users/me/.minikube/machines/minikube/id_rsa (-rw-------)
&{[-F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none docker@192.168.64.13 -o IdentitiesOnly=yes -i /Users/me/.minikube/machines/minikube/id_rsa -p 22] /usr/bin/ssh <nil>}
About to run SSH command:
sudo umount /mount-9p;
SSH cmd err, output: exit status 32: umount: /mount-9p: not mounted

(minikube) Calling .GetSSHHostname
(minikube) Calling .GetSSHPort
(minikube) Calling .GetSSHKeyPath
(minikube) Calling .GetSSHKeyPath
(minikube) Calling .GetSSHUsername
Using SSH client type: external
Using SSH private key: /Users/me/.minikube/machines/minikube/id_rsa (-rw-------)
&{[-F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none docker@192.168.64.13 -o IdentitiesOnly=yes -i /Users/me/.minikube/machines/minikube/id_rsa -p 22] /usr/bin/ssh <nil>}
About to run SSH command:

sudo mkdir -p /mount-9p || true;
sudo mount -t 9p -o trans=tcp -o port=62425 -o uid=1001 -o gid=1001 192.168.64.1 /mount-9p;
sudo chmod 775 /mount-9p;
fejta-bot commented 6 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta. /lifecycle stale

fejta-bot commented 6 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten /remove-lifecycle stale

fejta-bot commented 6 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close