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

Don't disable other container engines when --vm_driver=none #4545

Conversation

marcosdiez
Copy link
Contributor

@marcosdiez marcosdiez commented Jun 20, 2019

closes #4541

it speedups a second on two the minikube launch here !

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

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 /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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 20, 2019
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 20, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: marcosdiez
To complete the pull request process, please assign afbjorklund
You can assign the PR to them by writing /assign @afbjorklund 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

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 20, 2019
@tstromberg tstromberg changed the title We don't disable other container engines when vmdriver==none Don't disable other container engines when --vm_driver=none Jun 24, 2019
@@ -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
Copy link
Contributor

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.

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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 ?

@marcosdiez marcosdiez force-pushed the dont_disable_container_engines_when_vmdriver_is_none branch from 70cdcbd to f802c19 Compare June 24, 2019 12:32
@marcosdiez
Copy link
Contributor Author

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

@medyagh
Copy link
Member

medyagh commented Jun 25, 2019

@minikube-bot OK to test

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 {
Copy link
Member

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

@medyagh
Copy link
Member

medyagh commented Jun 28, 2019

/retest this please

@RA489
Copy link

RA489 commented Jul 1, 2019

@minikube-bot OK to test

@tstromberg tstromberg merged commit b0b13e1 into kubernetes:master Jul 11, 2019
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. needs-ok-to-test Indicates a PR that requires an org member to verify it 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.

NoneDriver: Minikube start restarts containerd, hence it kills all my non k8s containers
6 participants