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

wip: Improved message when docker is not installed for none #7358

Closed
wants to merge 1 commit into from
Closed

wip: Improved message when docker is not installed for none #7358

wants to merge 1 commit into from

Conversation

zerefwayne
Copy link

fixes #7166

before:

medya@none-experiment-instance-1-medya:~$ sudo minikube start --vm-driver=none
πŸ˜„  minikube v1.8.2 on Ubuntu 18.04
✨  Using the none driver based on user configuration
🀹  Running on localhost (CPUs=2, Memory=7470MB, Disk=9749MB) ...
πŸ’£  Unable to start VM. Please investigate and run 'minikube delete' if possible: creating host: create: precreate:
 exec: "docker": executable file not found in $PATH
😿  minikube is exiting due to an error. If the above message is not useful, open an issue:
πŸ‘‰  https://github.com/kubernetes/minikube/issues/new/choose

after:

$ sudo ./out/minikube start --driver=none
πŸ˜„  minikube v1.9.0 on Ubuntu 18.04
✨  Using the none driver based on existing profile
πŸ‘  Starting control plane node  in cluster minikube
🀹  Running on localhost (CPUs=8, Memory=15803MB, Disk=149202MB) ...
🀦  StartHost failed, but will try again: creating host: create: precreate: docker not found in $PATH. please install docker or try adding it to the $PATH
🀹  Running on localhost (CPUs=8, Memory=15803MB, Disk=149202MB) ...
❌  StartHost failed again: creating host: create: precreate: docker not found in $PATH. please install docker or try adding it to the $PATH
πŸ‘‰  Run: "minikube delete", then "minikube start --alsologtostderr -v=1" to try again with more logging
πŸ’£  Failed to start none bare metal machine. "minikube start" may fix it.: creating host: create: precreate: docker not found in $PATH. please install docker or try adding it to the $PATH
😿  minikube is exiting due to an error. If the above message is not useful, open an issue:
πŸ‘‰  https://github.com/kubernetes/minikube/issues/new/choose

This pull request changes the error message from exec: "docker": executable file not found in $PATH to docker not found in $PATH. please install docker or try adding it to the $PATH

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 1, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @zerefwayne!

It looks like this is your first PR to kubernetes/minikube πŸŽ‰. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/minikube has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. πŸ˜ƒ

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 1, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @zerefwayne. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 1, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zerefwayne
To complete the pull request process, please assign priyawadhwa
You can assign the PR to them by writing /assign @priyawadhwa in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zerefwayne
Copy link
Author

/assign @priyawadhwa

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

_, err := exec.LookPath("docker")
return err
if _, err := exec.LookPath("docker"); err != nil {
return errors.New("docker not found in $PATH. please install docker or try adding it to the $PATH")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not the right place to add a solution message

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you suggest where should I put this message?

As you said the open an issue shouldn't appear, I'll change the log function from error -> withMessage.

@medyagh medyagh changed the title Improved message when docker is not installed for none wip: Improved message when docker is not installed for none Apr 1, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 1, 2020
@medyagh
Copy link
Member

medyagh commented Apr 1, 2020

zerefwayne the purpose was of the issue was not to show the failure to create an issue

🀹  Running on localhost (CPUs=8, Memory=15803MB, Disk=149202MB) ...
❌  StartHost failed again: creating host: create: precreate: docker not found in $PATH. please install docker or try adding it to the $PATH
πŸ‘‰  Run: "minikube delete", then "minikube start --alsologtostderr -v=1" to try again with more logging
πŸ’£  Failed to start none bare metal machine. "minikube start" may fix it.: creating host: create: precreate: docker not found in $PATH. please install docker or try adding it to the $PATH
😿  minikube is exiting due to an error. If the above message is not useful, open an issue:
πŸ‘‰  https://github.com/kubernetes/minikube/issues/new/choose

we dont want to direct ppl to create an issue, when we know what the problem is,

this PR instead should check the error if docker is not installed, should exit with a message

@priyawadhwa
Copy link

Hey @zerefwayne thanks for opening this PR. You can check if docker is installed in the precreate check for the none driver:

https://github.com/kubernetes/minikube/blob/master/pkg/drivers/none/none.go#L82

if you can't find the docker executable, output something like this:

		out.T(out.FailureType, `Unable to find docker executable on PATH, please make sure it is correctly installed: {{.error}}`, out.V{"error": err})

@afbjorklund
Copy link
Collaborator

Alternative implementation in #7388

✨  Using the docker driver based on user configuration

❗  'docker' driver reported an issue: exec: "docker": executable file not found in $PATH
πŸ’‘  Suggestion: Docker is required.
πŸ“˜  Documentation: https://minikube.sigs.k8s.io/docs/reference/drivers/docker/

πŸ’£  docker does not appear to be installed

@afbjorklund afbjorklund closed this Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve message when docker is not installed for none
6 participants