-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Don't disable other container engines when --vm_driver=none #4545
Don't disable other container engines when --vm_driver=none #4545
Conversation
Hi @marcosdiez. 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 Once the patch is verified, the new status will be reflected by the 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: marcosdiez 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 |
Can one of the admins verify this patch? |
cmd/minikube/cmd/start.go
Outdated
@@ -672,7 +672,8 @@ func configureRuntimes(runner cruntime.CommandRunner) cruntime.Manager { | |||
exit.WithError(fmt.Sprintf("Failed runtime for %+v", config), err) | |||
} | |||
|
|||
err = cr.Enable() | |||
disableOtherContainerEngines := viper.GetString(vmDriver) != constants.DriverNone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this is clever, let's aim for easier readability:
disableOthers := true
if viper.GetString(vmDriver) == constants.DriverNone {
disableOthers = false
}
cr.Enable(disableOthers)
Also, prefer shorter variable names for variables which have a very short scope.
pkg/minikube/cruntime/containerd.go
Outdated
func (r *Containerd) Enable() error { | ||
if err := disableOthers(r, r.Runner); err != nil { | ||
glog.Warningf("disableOthers: %v", err) | ||
func (r *Containerd) Enable(disableOtherContainerEngines bool) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer shorter variable names for a short scope, such as disableOthers
. Leave the long variable names for globals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, although I agree, I can't do it. We have a function called disableOthers
already.
I can't think about another good short name.
Do you have any suggestions ?
70cdcbd
to
f802c19
Compare
Just for the record my build passed although Travis says otherwise: https://travis-ci.org/kubernetes/minikube/builds/549788904?utm_source=github_status&utm_medium=notification |
…ner_engines_when_vmdriver_is_none
@minikube-bot OK to test |
pkg/minikube/cruntime/crio.go
Outdated
func (r *CRIO) Enable() error { | ||
if err := disableOthers(r, r.Runner); err != nil { | ||
glog.Warningf("disableOthers: %v", err) | ||
func (r *CRIO) Enable(disableOtherContainerEngines bool) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets change disableOtherContainerEngines
to disOthers
/retest this please |
@minikube-bot OK to test |
closes #4541
it speedups a second on two the minikube launch here !