-
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
Gracefully exit if container runtime is misspelled #8593
Gracefully exit if container runtime is misspelled #8593
Conversation
Hi @sunny-b. 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. |
Travis tests have failedHey @sunny-b, 1st Buildmake test
TravisBuddy Request Identifier: b85ccf90-b994-11ea-a74d-ef5d1a577ce8 |
Can one of the admins verify this patch? |
46061f1
to
9bcc587
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sunny-b 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 |
Is it normal for the |
The Docker Desktop VM on the Mac looks sad: |
/ok-to-test |
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.
we have some hardcoed check for ==crio
for example
that means if user provded cri-o it would not activate that if statement.
I suggest we make all of the a constatnt maybe int he cruntime package,
and instead of =="crio" it shoudl be
if cfg.KubernetesConfig.ContainerRuntime == cruntime.CRIO {
and if user provided either crio or cri-o we should set it the option to cruntime.CRIO
sorry that this PR's had to also take care of technical debt in minikube
kvm2 Driver |
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.
also in this line,
https://github.com/medyagh/minikube/blob/3bc3ce95de5b77e2672d320f131beb8a761ec1ad/cmd/minikube/cmd/start_flags.go#L314
we should make sure we are passing the minikube's accepted spelling
I suggest to make sure our config files are backward compatible, we keep the default name to be called crio but we also accept CRI-O or cri-o
so in the cluster config we shoudl have same old value (crio) so there shouldnt be an issue upgrading minikube cluster
56fa2b9
to
2823815
Compare
Okay I've updated it to use |
kvm2 Driver Times for Minikube (PR 8593): [63.232162820999996 65.924830108 62.582048011] Averages Time Per Log
docker Driver Times for Minikube (PR 8593): [26.369950641 25.978270979 27.649858516999995] Averages Time Per Log
|
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.
Thank you for this PR
This fixes #7426 by creating a simple lookup for valid container runtimes
(docker crio containerd)
and adding it in thevalidateFlags
check.Before:
$ ./out/minikube-darwin-amd64 start --driver=docker --container-runtime=conatinerd 😄 minikube v1.12.0-beta.0 on Darwin 10.14.6 ✨ Using the docker driver based on existing profile 🆕 Kubernetes 1.18.3 is now available. If you would like to upgrade, specify: --kubernetes-version=v1.18.3 💣 error provisioning host: Failed to generate config: new runtime manager: unknown runtime type: "conatinerd" 😿 minikube is exiting due to an error. If the above message is not useful, open an issue: 👉 https://github.com/kubernetes/minikube/issues/new/choose
After:
$ ./out/minikube-darwin-amd64 start --driver=docker --container-runtime=conatinerd 😄 minikube v1.12.0-beta.0 on Darwin 10.14.6 ✨ Using the docker driver based on existing profile 💡 Invalid Container Runtime: "conatinerd". Valid runtimes are: docker, crio, containerd