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

minikube --vm-driver=none crashes cryptically with permission denied #4462

Closed
nicks opened this issue Jun 10, 2019 · 7 comments · Fixed by #4659
Closed

minikube --vm-driver=none crashes cryptically with permission denied #4462

nicks opened this issue Jun 10, 2019 · 7 comments · Fixed by #4659
Labels
co/none-driver priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@nicks
Copy link

nicks commented Jun 10, 2019

Thanks for your work on minikube!

Tried to start with --vm-driver=none and it failed

Is this expected to work? If not, it would be nice if it failed up-front with a clearer error message, rather than getting halfway through the process and dying cryptically. Would you be open to a PR to improve the error messaging?

Full details below

The exact command to reproduce the issue:

$ minikube --vm-driver=none start

The full output of the command that failed:

😄  minikube v1.1.1 on linux (amd64)
🔥  Creating none VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
🐳  Configuring environment for Kubernetes v1.14.3 on Docker 18.09.6
❌  Unable to load cached images: loading cached images: loading image /home/nick/.minikube/cache/images/gcr.io/k8s-minikube/storage-provisioner_v1.8.1: stat /home/nick/.minikube/cache/images/gcr.io/k8s-minikube/storage-provisioner_v1.8.1: no such file or directory
💾  Downloading kubeadm v1.14.3
💾  Downloading kubelet v1.14.3

💣  Failed to update cluster: downloading binaries: copying kubeadm: copy: error removing file /usr/bin/kubeadm: remove /usr/bin/kubeadm: permission denied

The operating system version:

$ uname -a
Linux Sleepy 4.15.0-51-generic #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
``
@afbjorklund
Copy link
Collaborator

This seems related to #3718 remove /usr/bin/kubeadm: permission denied

For now you need to run the none-driver using sudo, on your dedicated VM.
https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md

@afbjorklund
Copy link
Collaborator

Also same as #3760

@sharifelgamal
Copy link
Collaborator

Generally, the none driver needs to be run as root. This is behavior we eventually want to change, but for now a sudo is usually required. We have #4420 around proper error messaging around sudo, this seems to be related enough to tie in.

@sharifelgamal sharifelgamal added needs-solution-message Issues where where offering a solution for an error would be helpful priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Jun 11, 2019
@afbjorklund
Copy link
Collaborator

Some people don't like the concept of the none-driver silently calling sudo behind the scenes, so there are some things left to discuss. But it definitely could fail with a more obvious message, as per the other issue.

@afbjorklund
Copy link
Collaborator

It was supposed to crash sooner or later, if it hadn't been the /usr/bin/kubeadm it would have been:

[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
	[ERROR IsPrivilegedUser]: user is not running as root

@sharifelgamal
Copy link
Collaborator

That's a much better error message in my opinion, we should put that up front.

@afbjorklund
Copy link
Collaborator

We do run it with sudo kubeadm, so there is still some things left to sort out ("who calls sudo ?").

i.e. someone needs to do it, normally we are running as user on the host and sudo root on the VM
But none is a special case, since it runs both aspects on the same machine (i.e. the localhost)

If the user is not root, then that normally means that sudo will throw up a password prompt later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/none-driver priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants