Minikube: question about minikube mount usage

Created on 12 Jul 2017  路  5Comments  路  Source: kubernetes/minikube

Is this a BUG REPORT or FEATURE REQUEST? (choose one): I do not know, it may be a question

Minikube version (use minikube version): v0.20.0

Environment:

  • OS (e.g. from /etc/os-release): macOS 10.12.5
  • VM Driver: virtualbox
  • ISO version: v0.20.0

What happened:
I am suffering the mount issue after I sleep/open the my macbook, or stop/start the minikube vm or kill/start the minikube mount process. There is an I/O error happened in my simple web app. (maybe it is caused by inode of mount point changed?).

May I expect there is no I/O Error after I mount again? Now I need to delete the pods and create again to make it work. Is there a way to do not recreate pods to make it work again after mount process killed and started again?

Here is the reproducible steps for my web app usage:

  1. I use minikube mount to mount directory from host to minikube vm, and use hostPath in k8s conf to mount to container. It works well, I can access the top page.
  2. And then I kill the minikube mount process, and sudo umount and sudo rm -rf the mount point in minikube vm manually and keep the pods running.
  3. I run minikube mount command again, and when I access the top page, it throws I/O Error that can not access the files, actually they are mounted in the minikube vm.
aremount lifecyclrotten

Most helpful comment

I have a similar problem. I run cluster like this:

minikube start --extra-config=apiserver.authorization-mode=RBAC \
               --cpus=2 --memory=4096 \
               --mount --mount-string="/home/dmitry/dev:/app"

And mounting stops to work at a random time, so I get the following errors from npm when try to run new pod:

npm ERR! path /home/node/app/package.json
npm ERR! code EINVAL
npm ERR! errno -22
npm ERR! syscall open
npm ERR! EINVAL: invalid argument, open '/home/node/app/package.json'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/node/.npm/_logs/2018-05-26T22_40_55_063Z-debug.log
$ minikube ssh
$ ls /app
ls: cannot access '/app': Invalid argument

In this case only cluster deletion and rebooting helps

All 5 comments

I have a similar setup but using xhyve instead of virtualbox.
When I do npm install in a running container then I'm always getting different errors that seem to be related to the minikube mount.

npm ERR! path /app/node_modules/.staging
npm ERR! code EIO
npm ERR! errno -5
npm ERR! syscall rmdir
npm ERR! EIO: i/o error, rmdir '/app/node_modules/.staging'

or

An unexpected error occurred: "EINVAL: invalid argument, scandir '/app/node_modules/grpc/deps/grpc/third_party/boringssl/fuzz/cert_corpus'".

Not sure what to do there.

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

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

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

I have a similar problem. I run cluster like this:

minikube start --extra-config=apiserver.authorization-mode=RBAC \
               --cpus=2 --memory=4096 \
               --mount --mount-string="/home/dmitry/dev:/app"

And mounting stops to work at a random time, so I get the following errors from npm when try to run new pod:

npm ERR! path /home/node/app/package.json
npm ERR! code EINVAL
npm ERR! errno -22
npm ERR! syscall open
npm ERR! EINVAL: invalid argument, open '/home/node/app/package.json'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/node/.npm/_logs/2018-05-26T22_40_55_063Z-debug.log
$ minikube ssh
$ ls /app
ls: cannot access '/app': Invalid argument

In this case only cluster deletion and rebooting helps

Was this page helpful?
0 / 5 - 0 ratings