-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
macOS mount: mounted directory is empty #2481
Comments
Workaround this issue by using scp -ri "$(minikube ssh-key)" "$PWD" docker@$(minikube ip):/tmp
docker run --rm -it -v /tmp:/testmount alpine |
With xhyve being deprecated would be great to get it fixed, virtualbox is slower for local environments. (i.e. minikube delete deletes all images cache and need to refetch again, while hyperkit caches them on host machine) |
I'm suffering this issue as well 😞 |
+1 same issue here |
This still appears to be an issue with minikube v0.28.0, k8s v1.10.0, and macOS 10.13.5. The hyperkit driver in general seems to be pretty solid now (although kubeadm doesn't work at all; localkube must be used), however without a mounting mechanism, minikube isn't useful for local development. Which kind of defeats the purpose. Back to Virtualbox! |
any update on when a fix for this will be released? Agree with @zhaytee that this is a big blocker to use hyperkit. We are using xhye for now. |
AFAIK the xhyve driver supports 9p or NFS mounts. Can you explain which one you're trying to use with hyperkit? |
@dlorenc just trying to do the standard mounts using
|
Also seeing this issue in minikube v0.28.1 |
Can replicate this issue in latest...
|
This definitely seems like a poor user experience. We need to do a deep dive to make mounts more reliable. As a workaround, I suspect using VirtualBox as a a vm-driver may work, as it has a more robust mounting mechanism. |
still on v0.30.0 |
just give up on windows |
Still on version: v0.32.0 VirtualBox is working fine but poor performance. |
Still an issue on v0.33.1 |
It's a poor workaround to be sure, but this command left running in a terminal
Seems to make the above testcase work as expected
|
Still an issue on v1.0.0 |
I'm curious, for those of you who are seeing this - is this occurring with a directory that contains more than 600 files? If so, it may be related to #1753 |
the Mac /Users folder is not getting mounted, this still happens in 1.2.0 and on Mac OS
|
I do not have the same problem when running with the
|
@riklopfer This issue is about using the |
@sharifelgamal I am running the commands which were originally reported to reproduce this issue (see #2481 (comment)) . Perhaps this issue changed subject at some point. If this should be tracked elsewhere, #10851 can be reopened. |
Issue happens on arch - docker driver as well. Mounting the folder manually works, able to see the contents, mount at start doesnt.. |
My Minikube version is: v1.18.1 Currently working by manually running the mount command after start, but shouldnt this be at start? |
@legend-zeratul to be clear, it's the |
OK, let me add a more detailed description.. For development, say I'm building appX and as part of containerising the app, I've moved out all persistent stores into a set of folders, say, dataX.. As I've understood, the base dataX folder needs to be mounted into the minikube's /data directory (for example), and the app's persistent volumes refer to this /data directory in their descriptors.. As part of normal dev cycles, anyone would need the ability to mount, unmount this directory and undeploy/deploy the containers independently.. The expectation would also be that if the local machine is restarted, the folder is automatically re-mounted when minikube starts.. While I understand local folder mounts are a security risk in integration/staging/production type setups, a local dev setup (minikube's focus domain) should be fine with local folder mounts, so the expectation would be to make this as seamless as possible to ease development time activities.. Problems:
Docker stack does the expected behaviour very very nicely.. Restarting brings everything up to where it was.. The sequence that does work:
(looks like a weird issue - if the second step is skipped and we attempt a minikube mount with the kill=true flag directly, the mount process exits successfully, but the /data folder is empty (not correctly mounted)) The above sequence gets a working cluster with the folders mounted, however bringing down the cluster needs the entire sequence to be repeated (without kill=true and then with kill=true) for the data folders to get mounted.. You can imagine the fun that we will now have when service containers -> need persistent volume claims -> need persistent volumes -> need /data folder mounted: restarting the cluster or the machine as a result requires us to undeploy/deploy everything - this is the point when this stopped being workable.. Hope that helps - open to helping out with testing a patch if needed.. Do let me know.. (dont hv a local source->compile build setup, but will figure that out when needed). Thanks. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
This issue is still active |
Very unreliable 9P mounts on Hyperkit, MacOS 11.6 and minikube 1.23.1 I was planning to replace docker desktop with minikube but migration of existing volumes has been very difficult so far, because of these minikube bugs. |
More than three years since this issue was opened... |
Its still an issue even on HyperV, you mount at start and then it simply stops working after some time, while you are updating some PODs using the same volume |
I had a similar problem on M1 Mac and ended up solving it using this command:
|
One thing to note, after running |
Is this a BUG REPORT or FEATURE REQUEST?
Bug report
Please provide the following details:
Environment:
Minikube version: v0.25.0
What happened:
Tried to mount a host directory into a container. The directory inside the container is empty.
What you expected to happen:
The directory inside the container should give access to the mounted directory on the host. At least, that was the behavior when I was using minikube and VirtualBox!
How to reproduce it:
Anything else do we need to know:
Is this not possible when using hyperkit? If not, what is the alternative? I noticed some options relating to NFS, but I didn't dig too deeply. I'd prefer to just use the standard Docker volume mount mechanism if possible.
Thank you!
The text was updated successfully, but these errors were encountered: