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

Add option to skip VM driver PreCreateCheck #3729

Closed
thewilli opened this issue Feb 21, 2019 · 10 comments
Closed

Add option to skip VM driver PreCreateCheck #3729

thewilli opened this issue Feb 21, 2019 · 10 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/backlog Higher priority than priority/awaiting-more-evidence. r/2019q2 Issue was last reviewed 2019q2

Comments

@thewilli
Copy link

thewilli commented Feb 21, 2019

Environment: Windows 10 Version 10.0.16299.904
Minikube: v0.34.1

The supported drivers provide a PreCreateCheck() method that is invoked by minikube in order to ensure the driver works properly and its prerequisites are fulfiled.
Unfortunately those prerequisites are not without flaws. The one implemented in the hyperv driver invokes some PowerShell as part of its checks. The one listed before checks if the user is part of the Hyper-V Administrators group. While this check is a good idea, it does not work if the computer joined a domain and cannot reach its Domain Controller. Therefore, when e.g. working in Home Office or in the train without network connectivity at all, I cannot use minikube in this setup.

Please add an option to skip (or ignore failing) PreCreateChecks.

The minishift project is doing something similar specific to hyperv, but I'd propose to just add a general I-know-what-I'm-doing-option to continue when those checks failed.

@tstromberg tstromberg changed the title Allow to proceed when PreCreateChecks fail Add option to skip VM driver PreCreateCheck Feb 22, 2019
@tstromberg
Copy link
Contributor

This sounds like a great idea, and I would be happy to review any PR that implements it.

@tstromberg tstromberg added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Feb 22, 2019
@thewilli
Copy link
Author

This sounds like a great idea, and I would be happy to review any PR that implements it.

@tstromberg okay, I'm on it. One question, though: I added a new configuration parameter to Cobra. This parameter, ignore-vm-driver-precheck (pretty long but self-explanatory) need to be accessed here (package k8s.io/minikube/pkg/minikube/machine). I have to use Viper in order to access the configuration parameter to not break the existing interfaces - there's no access to the corresponding config objects there.

My approach works, but I can't define the configurational key (i.e. flag name) next to the others. This would lead to circular imports.

Is there any other location to put this constant, or do you have another idea on how to solve this?

@tstromberg
Copy link
Contributor

Flags should only be referenced in the main package, so I think we'll need to pass it into Create somehow. I agree that it isn't very straightforward: I can't think of a way to do this without modifying libmachine to accept a new value in the Host struct, or adding a specific flag to the hyperv driver.

Here is an example of the latter approach: #3734

To mimic this particular case, we would need to modify the upstream hyperv driver we use:
https://github.com/machine-drivers/machine/blob/master/drivers/hyperv/hyperv.go

@tstromberg tstromberg added r/2019q2 Issue was last reviewed 2019q2 priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. and removed priority/backlog Higher priority than priority/awaiting-more-evidence. labels May 23, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 21, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 20, 2019
@tstromberg tstromberg added priority/backlog Higher priority than priority/awaiting-more-evidence. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. labels Sep 20, 2019
@priyawadhwa
Copy link

@thewilli are you still interested in implementing this issue?

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 16, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 15, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/backlog Higher priority than priority/awaiting-more-evidence. r/2019q2 Issue was last reviewed 2019q2
Projects
None yet
Development

No branches or pull requests

5 participants