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

Move some of the driver validation before driver selection #7080

Merged
merged 1 commit into from
Mar 18, 2020

Conversation

priyawadhwa
Copy link

@priyawadhwa priyawadhwa commented Mar 17, 2020

If a user passes in a driver via --vm-driver or --driver, then we should make sure it matches the preexisting cluster (if one exists) before we try and get information about the driver. This avoids confusing logs where we tell the user we're using the preexisting driver but then error out because they specified a different driver.

Previous logs:

$ minikube start --vm-driver none
😄  minikube v1.8.2 on Debian rodete
✨  Using the kvm2 driver based on existing profile
⌛  Reconfiguring existing host ...
🏃  Using the running kvm2 "minikube" VM ...
🐳  Preparing Kubernetes v1.17.3 on Docker 19.03.6 ...
🚀  Launching Kubernetes ... 

New logs:

$ minikube start --vm-driver none
😄  minikube v1.8.2 on Debian rodete
💥  The existing "minikube" VM was created using the "kvm2" driver, and is incompatible with the "none" driver.
👉  To proceed, either:

1) Delete the existing "minikube" cluster using: 'minikube delete'

* or *

2) Start the existing "minikube" cluster using: 'minikube start --driver=kvm2'

💣  Exiting.

Fixes #7078

If a user passes in a driver via --vm-driver or --driver, then we should make sure it matches the preexisting cluster (if one exists) before we try and get information about the driver. This avoids confusing logs where we tell the user we're using the preexisting driver but then error out because they specified a different driver.
@priyawadhwa priyawadhwa added this to the v1.9.0 March 24th milestone Mar 17, 2020
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 17, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: priyawadhwa

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 17, 2020
@codecov-io
Copy link

Codecov Report

Merging #7080 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7080      +/-   ##
==========================================
- Coverage   36.94%   36.91%   -0.04%     
==========================================
  Files         146      146              
  Lines        9094     9102       +8     
==========================================
  Hits         3360     3360              
- Misses       5322     5330       +8     
  Partials      412      412
Impacted Files Coverage Δ
cmd/minikube/cmd/start.go 33.33% <0%> (-0.47%) ⬇️

@priyawadhwa
Copy link
Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Mar 17, 2020
@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

minikube ignores --driver
6 participants