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

FailFast if hyperkit is not installed. #5478

Closed
medyagh opened this issue Sep 26, 2019 · 10 comments · Fixed by #5833
Closed

FailFast if hyperkit is not installed. #5478

medyagh opened this issue Sep 26, 2019 · 10 comments · Fixed by #5833
Assignees
Labels
co/hyperkit Hyperkit related issues kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@medyagh
Copy link
Member

medyagh commented Sep 26, 2019

on a fresh macbook I had the following errors (not installed hyperkit)
minikube is trying to Retry to see if there would be an executable. while we should fail fast and tell user without must noise, to install hyperkit.

$ minikube start --vm-driver=hyperkit
😄  minikube v1.4.0 on Darwin 10.14.6
💾  Downloading driver docker-machine-driver-hyperkit:
    > docker-machine-driver-hyperkit.sha256: 65 B / 65 B [---] 100.00% ? p/s 0s
    > docker-machine-driver-hyperkit: 28.85 MiB / 28.85 MiB  100.00% 13.73 MiB 
🔑  The 'hyperkit' driver requires elevated permissions. The following commands will be executed:

    $ sudo chown root:wheel /Users/medya/.minikube/bin/docker-machine-driver-hyperkit 
    $ sudo chmod u+s /Users/medya/.minikube/bin/docker-machine-driver-hyperkit 


Password: 
Password: 
💿  Downloading VM boot image ...
    > minikube-v1.4.0.iso.sha256: 65 B / 65 B [--------------] 100.00% ? p/s 0s
    > minikube-v1.4.0.iso: 135.73 MiB / 135.73 MiB [-] 100.00% 19.20 MiB p/s 7s
🔥  Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
🔄  Retriable failure: create: Error creating machine: Error in driver during machine creation: new-ing Hyperkit: Could not find hyperkit executable
🔥  Deleting "minikube" in hyperkit ...
E0926 14:32:58.273210   25064 main.go:100] libmachine: (minikube) Error reading pid file: open /Users/medya/.minikube/machines/minikube/hyperkit.json: no such file or directory
🔥  Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
🔄  Retriable failure: create: Error creating machine: Error in driver during machine creation: new-ing Hyperkit: Could not find hyperkit executable
🔥  Deleting "minikube" in hyperkit ...
E0926 14:33:06.640044   25064 main.go:100] libmachine: (minikube) Error reading pid file: open /Users/medya/.minikube/machines/minikube/hyperkit.json: no such file or directory
🔥  Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
🔄  Retriable failure: create: Error creating machine: Error in driver during machine creation: new-ing Hyperkit: Could not find hyperkit executable
🔥  Deleting "minikube" in hyperkit ...
E0926 14:33:15.004596   25064 main.go:100] libmachine: (minikube) Error reading pid file: open /Users/medya/.minikube/machines/minikube/hyperkit.json: no such file or directory
🔥  Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
🔄  Retriable failure: create: Error creating machine: Error in driver during machine creation: new-ing Hyperkit: Could not find hyperkit executable
🔥  Deleting "minikube" in hyperkit ...
E0926 14:33:25.064406   25064 main.go:100] libmachine: (minikube) Error reading pid file: open /Users/medya/.minikube/machines/minikube/hyperkit.json: no such file or directory

💣  Unable to start VM: create: Error creating machine: Error in driver during machine creation: new-ing Hyperkit: Could not find hyperkit executable

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new/choose


we need to detect after the driver-download that the hyperkit is not installed and exit with the links to documentation how to install it.

https://minikube.sigs.k8s.io/docs/start/macos/
or simply say

please install hyperkit using brew
`brew install hyperkit` or alternatively, you may Install HyperKit from GitHub https://github.com/moby/hyperkit
@medyagh medyagh added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. co/hyperkit Hyperkit related issues labels Sep 26, 2019
@medyagh medyagh changed the title detect early if hyperkit is not installed. FailFast and detect early if hyperkit is not installed. Sep 26, 2019
@medyagh medyagh added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Sep 26, 2019
@medyagh medyagh added this to the v1.5.0 milestone Sep 26, 2019
@medyagh medyagh changed the title FailFast and detect early if hyperkit is not installed. FailFast if hyperkit is not installed. Sep 26, 2019
@tstromberg tstromberg modified the milestones: v1.5.0, v1.6.0-candidate Oct 14, 2019
@tstromberg tstromberg removed this from the v1.6.0-candidate milestone Oct 21, 2019
@govargo
Copy link
Contributor

govargo commented Oct 31, 2019

I will work on this.

/assign

@govargo
Copy link
Contributor

govargo commented Oct 31, 2019

It seems that minikube outputs Suggestion message brew install hyperkit in v1.5.1.
But the minikube start & minikube delete errors keep happening.
I'll fix this.

And...I'm wondering.
Why minikube downloads docker-machine-driver-hyperkit, when hyperkit binary does not exist.
In my opinion, we can only install hyperkit by brew or make from source.
So Is docker-machine-driver-hyperkit used by what action?

$ minikube start --vm-driver=hyperkit
😄  minikube v1.5.1 on Darwin 10.14.5

⚠️  'hyperkit' driver reported a possible issue: exec: "hyperkit": executable file not found in $PATH
💡  Suggestion: Run 'brew install hyperkit'
📘  Documentation: https://minikube.sigs.k8s.io/docs/reference/drivers/hyperkit/

💾  Downloading driver docker-machine-driver-hyperkit:
    > docker-machine-driver-hyperkit.sha256: 65 B / 65 B [---] 100.00% ? p/s 0s
    > docker-machine-driver-hyperkit: 10.79 MiB / 10.79 MiB  100.00% 4.57 MiB p
🔑  The 'hyperkit' driver requires elevated permissions. The following commands will be executed:

    $ sudo chown root:wheel /Users/k-iso/.minikube/bin/docker-machine-driver-hyperkit
    $ sudo chmod u+s /Users/k-iso/.minikube/bin/docker-machine-driver-hyperkit


Password:
💿  Downloading VM boot image ...
    > minikube-v1.5.1.iso.sha256: 65 B / 65 B [--------------] 100.00% ? p/s 0s
    > minikube-v1.5.1.iso: 143.76 MiB / 143.76 MiB [-] 100.00% 64.66 MiB p/s 3s
🔥  Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
🔄  Retriable failure: create: Error creating machine: Error in driver during machine creation: new-ing Hyperkit: Could not find hyperkit executable
🔥  Deleting "minikube" in hyperkit ...
🔥  Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
🔄  Retriable failure: create: Error creating machine: Error in driver during machine creation: new-ing Hyperkit: Could not find hyperkit executable
🔥  Deleting "minikube" in hyperkit ...
🔥  Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
🔄  Retriable failure: create: Error creating machine: Error in driver during machine creation: new-ing Hyperkit: Could not find hyperkit executable
🔥  Deleting "minikube" in hyperkit ...
🔥  Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
🔄  Retriable failure: create: Error creating machine: Error in driver during machine creation: new-ing Hyperkit: Could not find hyperkit executable
🔥  Deleting "minikube" in hyperkit ...

💣  Unable to start VM: create: Error creating machine: Error in driver during machine creation: new-ing Hyperkit: Could not find hyperkit executable

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new/choose

@medyagh
Copy link
Member Author

medyagh commented Oct 31, 2019

@govargo we have our own docker-machine-driver-hyperkit that wraps arround the hyperkit driver.

It's confusing to users because they think we are downloading the hyperkit for them.

I agree it's useless to download our driver for hyperkit if the hyperkit itself is not installed. We need to fail fast and provide them instruction to install or it even better if they have brew we could do it for them

@medyagh
Copy link
Member Author

medyagh commented Oct 31, 2019

@govargo it's yours ! Will be happy to review the PR

@govargo
Copy link
Contributor

govargo commented Oct 31, 2019

@medyagh

I agree it's useless to download our driver for hyperkit if the hyperkit itself is not installed. We need to fail fast and provide them instruction to install or it even better if they have brew we could do it for them

Thank you for your comment!
I understand this!

@medyagh
Copy link
Member Author

medyagh commented Oct 31, 2019

@govargo one request,

we just had an issue that having an older hyperkit driver, caused this issue #5594

it would be great that as part of this PR, on top of checking if hyperkit is installed, we check for the hyperkit version, and if there is an update available or if it is older than a specific verison, warn user about it or ask them if they let us upgrade it for them

@govargo
Copy link
Contributor

govargo commented Nov 1, 2019

@medyagh

it would be great that as part of this PR, on top of checking if hyperkit is installed, we check for the hyperkit version, and if there is an update available or if it is older than a specific verison, warn user about it or ask them if they let us upgrade it for them

OK,I see.
I'll add a presence check of hyperkit and version check of it.

@medyagh medyagh added kind/feature Categorizes issue or PR as related to a new feature. and removed help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Nov 4, 2019
@tstromberg tstromberg added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Dec 9, 2019
@tstromberg
Copy link
Contributor

tstromberg commented Dec 16, 2019

We do this now as of minikube v1.6, unless they specify --vm-driver=hyperkit, at which point we warn I believe.

@govargo
Copy link
Contributor

govargo commented Dec 17, 2019

@tstromberg Thank you for sharing. I'll close the PR #5833

@tstromberg
Copy link
Contributor

tstromberg commented Dec 17, 2019

@govargo - #5833 also handles version checking. We don't do anything with versions, so your PR is still valuable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/hyperkit Hyperkit related issues kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants