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

Sorts the outputs and also prints out alternative driver info when no driver is picked. #10394

Closed
wants to merge 2 commits into from

Conversation

lxzhang000
Copy link

@lxzhang000 lxzhang000 commented Feb 7, 2021

fixes #10009

Looks like "Unhealthy" prioriy level is now only used for driver selection, and I think it is not necessary since we can get the unhealthy info to filter the driver out from State.Healthy.

Another problem associated with this one is that the current alternatives is not printed out when failed.

Before:

  1. All rejects are in "Unhealthy" priority therefore can't not be displayed by preference.
  2. No info of alternative drivers that are not picked.

After:

  1. All rejects keeps their orginal priority.
  2. The alternative drivers lower than "Discouraged" priority will also be printed out (take "ssh" as an example).
* Unable to pick a default driver. Here is what was considered, in preference order:
  ...
  - ssh: Rejected due to low priority
  ...

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 7, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @lxzhang000. 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 Feb 7, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Can one of the admins verify this patch?

@lxzhang000 lxzhang000 marked this pull request as ready for review February 7, 2021 15:25
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 7, 2021
@medyagh
Copy link
Member

medyagh commented Feb 9, 2021

@lxzhang000 please check unit test

run make test locally

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

I can not verify if this PR is brekaing a logic that @tstromberg intended or not (classifiying an unhealthy driver as a priority of its own)

I refer judgment to @tstromberg

Copy link
Contributor

@tstromberg tstromberg left a comment

Choose a reason for hiding this comment

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

Overall, things seem right to me. Tested using:

touch /tmp/podman && chmod 755 /tmp/podman && env PATH=/tmp ./out/minikube start

Output:

😄  minikube v1.17.1 on Debian rodete
👎  Unable to pick a default driver. Here is what was considered, in preference order:
    ▪ docker: Not installed: exec: "docker": executable file not found in $PATH
    ▪ kvm2: Not installed: exec: "virsh": executable file not found in $PATH
    ▪ vmware: Not installed: exec: "docker-machine-driver-vmware": executable file not found in $PATH
    ▪ virtualbox: Not installed: unable to find VBoxManage in $PATH
    ▪ ssh: Rejected due to low priority
    ▪ none: Not installed: exec: "iptables": executable file not found in $PATH
    ▪ podman: Not healthy: exec: "sudo": executable file not found in $PATH

❌  Exiting due to DRV_NOT_DETECTED: No possible driver was detected. Try specifying --driver, or see https://minikube.sigs.k8s.io/docs/start/

The only request is to improve the "Rejected due to low priority" text.

@afbjorklund
Copy link
Collaborator

For podman it is true that it is still experimental, but hope to change that for next release. It should be on par with Docker.

See #10237

@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 Feb 10, 2021
@lxzhang000
Copy link
Author

Hi, @medyagh I have updated the failed unit tests. FYI, I could pass the uni test locally even before the modification and the reason is that if two drivers have the same priority, their order is not determined.

I suppose the root cause is the traversal order of go map is not determinded:

for _, def := range r.drivers {

Looks like for display it doesn't care the order if drivers have the same priority, I use different priorites for unit test.

@k8s-ci-robot
Copy link
Contributor

@lxzhang000: PR needs rebase.

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-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 20, 2021
@medyagh medyagh closed this Mar 30, 2021
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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

Rejected drivers not shown in priority order
6 participants