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: Check if minikube is already running #3293

Closed
wants to merge 3 commits into from

Conversation

ravsa
Copy link

@ravsa ravsa commented Nov 2, 2018

Fixes: #2646

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 2, 2018
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@RA489
Copy link

RA489 commented Nov 4, 2018

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: RA489, ravsa
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: tstromberg

If they are not already assigned, you can assign the PR to them by writing /assign @tstromberg in a comment when ready.

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
Copy link
Contributor

@RA489: changing LGTM is restricted to assignees, and only kubernetes/minikube repo collaborators may be assigned issues.

In response to this:

/lgtm

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.

@ravsa ravsa changed the title Add check if the minikube is already running Check if the minikube is already running Nov 6, 2018
@ravsa
Copy link
Author

ravsa commented Nov 6, 2018

@tstromberg, @balopat, @aaron-prindle Please take a look here

@tstromberg tstromberg self-assigned this Nov 6, 2018
@tstromberg
Copy link
Contributor

@minikube-bot OK to test

@dlorenc
Copy link
Contributor

dlorenc commented Nov 13, 2018

Can you explain the purpose of this change? Start is supposed to be safe to call repeatedly.

@ravsa
Copy link
Author

ravsa commented Nov 14, 2018

@dlorenc the purpose of this PR is to fix the issue #2646 and possibly related issue #3284. IMHO it's good to skip the start process if it's already running.

@balopat
Copy link
Contributor

balopat commented Nov 19, 2018

@minikube-bot OK to test

2 similar comments
@balopat
Copy link
Contributor

balopat commented Nov 25, 2018

@minikube-bot OK to test

@balopat
Copy link
Contributor

balopat commented Nov 27, 2018

@minikube-bot OK to test

Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

We shouldn't exit if the machine doesn't exist.This is incorrect behavior and is breaking the integration tests. Please make sure integration tests pass on your changes, they are getting less flaky now.

@balopat balopat changed the title Check if the minikube is already running Check if minikube is already running Nov 27, 2018
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 27, 2018
@balopat
Copy link
Contributor

balopat commented Nov 28, 2018

@minikube-bot OK to test

@ravsa ravsa force-pushed the dev-minikube branch 3 times, most recently from 5dd4844 to 603b65d Compare November 30, 2018 18:00
@ravsa
Copy link
Author

ravsa commented Dec 2, 2018

@balopat, could you help me with this build issue? it's taking too long.

@balopat
Copy link
Contributor

balopat commented Dec 6, 2018

@minikube-bot OK to test

@@ -112,6 +115,7 @@ func runStart(cmd *cobra.Command, args []string) {
}

api, err := machine.NewAPIClient()
ensureNotRunning(api, constants.DefaultMachineName)

Choose a reason for hiding this comment

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

What happens if the already running instance has a different name? (like via the --profile argument to minikube start)

Copy link
Author

Choose a reason for hiding this comment

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

nice catch, I will make the changes. Thanks

@tstromberg
Copy link
Contributor

@minikube-bot OK to test

1 similar comment
@tstromberg
Copy link
Contributor

@minikube-bot OK to test

@tstromberg
Copy link
Contributor

I believe this PR breaks the workflow where folks make changes to their local configuration, such as updating the version of Kubernetes used, and use minikube start to update their running VM to reflect that configuration.

I'm tempted to close this PR - but perhaps I'm not interpreting this change correctly?

@tstromberg
Copy link
Contributor

I've been thinking more about this, and have a few thoughts:

  • Folks currently rely on 'minikube start' to upgrade their VM's or apply small configuration changes.
  • On the other hand, most folks just want fast access to their VM.

We need to bridge the gap between the two, and I think the only way to do so is to compare the old configuration against the new one. If they match, exit early, otherwise, go through the full process.

Any opinions here?

@stafot
Copy link

stafot commented Apr 9, 2019

@tstromberg A good idea is to have 2 different "commands"/"flags" to serve these conflicting needs f.e a minikube start-fast vs a minikube start-update. Is it so crucial in your opinion to be unified under a same start command for keeping it simple?
Although I think that you are raising a valid concern.

@tstromberg
Copy link
Contributor

@tstromberg A good idea is to have 2 different "commands"/"flags" to serve these conflicting needs f.e a minikube start-fast vs a minikube start-update. Is it so crucial in your opinion to be unified under a same start command for keeping it simple?
Although I think that you are raising a valid concern.

How about adding a --update or --reconfigure flag to start?

In an ideal world, minikube should be able to detect whether or not reconfiguration is required, but it doesn't yet (PR's welcome!). This flag would allow users to override that detection, and specify whether or not to return quickly - as your PR does - or to forcibly reconfigure.

For your solution, you would add minikube start --reconfigure=false or --update=false. Thoughts?

@tstromberg tstromberg added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 11, 2019
@tstromberg tstromberg changed the title Check if minikube is already running WIP: Check if minikube is already running Apr 11, 2019
@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 11, 2019
@tstromberg
Copy link
Contributor

I'm closing as this PR seems to be inactive, and having unmergeable PR's around slows us down from making progress on the PR's that are active. Please re-open this PR once you've had a chance to address the feedback on it.

Rather than adding extra knobs, my preference is for this PR to check if the requested configuration is different than the previously setup configuration. If it's different, take the slow path - if it's the same, take the fast path.

Thank you for proposing this PR. It has sparked a very important discussion.

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-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

minikube start does not check if it is already running
9 participants