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

Gracefully exit if container runtime is misspelled #8593

Merged
merged 4 commits into from
Jun 30, 2020

Conversation

sunny-b
Copy link
Contributor

@sunny-b sunny-b commented Jun 28, 2020

This fixes #7426 by creating a simple lookup for valid container runtimes (docker crio containerd) and adding it in the validateFlags 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

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

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 /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 28, 2020
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 28, 2020
@TravisBuddy
Copy link

Travis tests have failed

Hey @sunny-b,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make test
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.13.8.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.0/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
gofmt -s -w pkg/minikube/assets/assets.go
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
/home/travis/gopath/bin/go-bindata
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.13.8.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.0/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/translate/translations.go -pkg translate translations/...
gofmt -s -w pkg/minikube/translate/translations.go
MINIKUBE_LDFLAGS="-X k8s.io/minikube/pkg/version.version=v1.12.0-beta.0 -X k8s.io/minikube/pkg/version.isoVersion=v1.11.0 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso -X k8s.io/minikube/pkg/version.gitCommitID="1f53fb42d932c39ab7c6aafce125509c8c55102f"" ./test.sh
= schema_check ==========================================================
go: downloading github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f
go: extracting github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f
go: downloading github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415
go: extracting github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415
go: downloading github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f
go: extracting github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f
go: finding github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f
go: finding github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415
go: finding github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f
ok
= go test ===============================================================
go: downloading github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
go: downloading github.com/machine-drivers/machine v0.7.1-0.20200323212942-41eb826190d8
go: downloading golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37
go: downloading github.com/opencontainers/go-digest v1.0.0-rc1
go: downloading github.com/machine-drivers/docker-machine-driver-vmware v0.1.1
go: downloading k8s.io/client-go v0.17.3
go: downloading k8s.io/apimachinery v0.17.3
go: extracting github.com/opencontainers/go-digest v1.0.0-rc1
go: extracting github.com/machine-drivers/docker-machine-driver-vmware v0.1.1
go: downloading github.com/pkg/browser v0.0.0-20160118053552-9302be274faa
go: extracting github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
go: downloading github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
go: extracting github.com/machine-drivers/machine v0.7.1-0.20200323212942-41eb826190d8
go: extracting github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
go: downloading golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
go: extracting github.com/pkg/browser v0.0.0-20160118053552-9302be274faa
go: extracting golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
go: extracting k8s.io/apimachinery v0.17.3
go: downloading github.com/olekukonko/tablewriter v0.0.4
go: extracting golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37
go: extracting github.com/olekukonko/tablewriter v0.0.4
go: downloading github.com/spf13/viper v1.7.0
go: downloading k8s.io/api v0.17.3
go: extracting github.com/spf13/viper v1.7.0
go: downloading github.com/blang/semver v3.5.0+incompatible
go: extracting k8s.io/client-go v0.17.3
go: extracting github.com/blang/semver v3.5.0+incompatible
go: downloading gopkg.in/ini.v1 v1.56.0
go: downloading github.com/magiconair/properties v1.8.1
go: downloading github.com/fsnotify/fsnotify v1.4.9
go: downloading github.com/afbjorklund/go-containerregistry v0.0.0-20200602203322-347d93793dc9
go: extracting github.com/magiconair/properties v1.8.1
go: extracting github.com/fsnotify/fsnotify v1.4.9
go: downloading github.com/subosito/gotenv v1.2.0
go: extracting gopkg.in/ini.v1 v1.56.0
go: downloading k8s.io/kubernetes v1.17.3
go: extracting github.com/subosito/gotenv v1.2.0
go: downloading github.com/spf13/cast v1.3.1
go: downloading k8s.io/kubectl v0.17.3
go: extracting github.com/spf13/cast v1.3.1
go: extracting github.com/afbjorklund/go-containerregistry v0.0.0-20200602203322-347d93793dc9
go: downloading github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7
go: downloading github.com/juju/mutex v0.0.0-20180619145857-d21b13acf4bf
go: downloading github.com/spf13/cobra v1.0.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/shirou/gopsutil v2.18.12+incompatible
go: downloading github.com/google/gofuzz v1.0.0
go: extracting k8s.io/api v0.17.3
go: extracting github.com/spf13/pflag v1.0.5
go: downloading gopkg.in/yaml.v2 v2.3.0
go: extracting github.com/spf13/cobra v1.0.0
go: downloading github.com/spf13/jwalterweatherman v1.1.0
go: extracting github.com/juju/mutex v0.0.0-20180619145857-d21b13acf4bf
go: downloading github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b
go: extracting github.com/hashicorp/hcl v1.0.0
go: extracting github.com/shirou/gopsutil v2.18.12+incompatible
go: extracting github.com/google/gofuzz v1.0.0
go: downloading golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2
go: downloading github.com/mitchellh/mapstructure v1.3.1
go: extracting github.com/spf13/jwalterweatherman v1.1.0
go: extracting gopkg.in/yaml.v2 v2.3.0
go: extracting k8s.io/kubectl v0.17.3
go: downloading github.com/pkg/errors v0.9.1
go: extracting github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b
go: downloading github.com/otiai10/copy v1.0.2
go: extracting github.com/mitchellh/mapstructure v1.3.1
go: extracting github.com/pkg/errors v0.9.1
go: extracting github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7
go: downloading golang.org/x/text v0.3.2
go: extracting golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2
go: extracting github.com/otiai10/copy v1.0.2
go: downloading cloud.google.com/go v0.57.0
go: downloading github.com/pkg/profile v0.0.0-20161223203901-3a8809bd8a80
go: downloading github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
go: downloading github.com/cheggaaa/pb v1.0.27
go: downloading golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
go: downloading github.com/cpuguy83/go-md2man v1.0.10
go: downloading google.golang.org/api v0.25.0
go: downloading github.com/cenkalti/backoff v2.2.1+incompatible
go: extracting cloud.google.com/go v0.57.0
go: extracting github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
go: downloading github.com/russross/blackfriday v1.5.3-0.20200218234912-41c5fccfd6f6
go: extracting github.com/cpuguy83/go-md2man v1.0.10
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.0
go: extracting github.com/pkg/profile v0.0.0-20161223203901-3a8809bd8a80
go: downloading github.com/docker/cli v0.0.0-20200303162255-7d407207c304
go: downloading cloud.google.com/go/storage v1.8.0
go: extracting github.com/cheggaaa/pb v1.0.27
go: downloading github.com/cheggaaa/pb/v3 v3.0.1
go: extracting k8s.io/kubernetes v1.17.3
go: extracting github.com/cenkalti/backoff v2.2.1+incompatible
go: extracting golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
go: extracting github.com/cpuguy83/go-md2man/v2 v2.0.0
go: downloading github.com/gogo/protobuf v1.3.1
go: downloading github.com/docker/go-connections v0.4.0
go: extracting golang.org/x/text v0.3.2
go: downloading github.com/mattn/go-runewidth v0.0.7
go: extracting github.com/docker/cli v0.0.0-20200303162255-7d407207c304
go: extracting cloud.google.com/go/storage v1.8.0
go: extracting google.golang.org/api v0.25.0
go: extracting github.com/russross/blackfriday v1.5.3-0.20200218234912-41c5fccfd6f6
go: extracting github.com/docker/go-connections v0.4.0
go: downloading github.com/google/uuid v1.1.1
go: extracting github.com/mattn/go-runewidth v0.0.7
go: downloading golang.org/x/sys v0.0.0-20200523222454-059865788121
go: downloading gopkg.in/inf.v0 v0.9.1
go: downloading github.com/pelletier/go-toml v1.8.0
go: downloading google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece
go: downloading google.golang.org/grpc v1.29.1
go: extracting github.com/cheggaaa/pb/v3 v3.0.1
go: downloading github.com/libvirt/libvirt-go v3.4.0+incompatible
go: extracting github.com/gogo/protobuf v1.3.1
go: downloading github.com/davecgh/go-spew v1.1.1
go: extracting github.com/pelletier/go-toml v1.8.0
go: downloading k8s.io/klog v1.0.0
go: extracting gopkg.in/inf.v0 v0.9.1
go: downloading sigs.k8s.io/yaml v1.1.0
go: extracting golang.org/x/sys v0.0.0-20200523222454-059865788121
go: extracting google.golang.org/grpc v1.29.1
go: extracting github.com/google/uuid v1.1.1
go: downloading github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
go: downloading github.com/afbjorklund/go-getter v1.4.1-0.20190910175809-eb9f6c26742c
go: downloading github.com/google/slowjam v0.0.0-20200530021616-df27e642fe7b
go: downloading sigs.k8s.io/sig-storage-lib-external-provisioner v4.0.0+incompatible
go: extracting github.com/davecgh/go-spew v1.1.1
go: extracting github.com/libvirt/libvirt-go v3.4.0+incompatible
go: downloading github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd
go: downloading github.com/fatih/color v1.9.0
go: extracting github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
go: downloading github.com/modern-go/reflect2 v1.0.1
go: extracting github.com/afbjorklund/go-getter v1.4.1-0.20190910175809-eb9f6c26742c
go: extracting sigs.k8s.io/yaml v1.1.0
go: extracting k8s.io/klog v1.0.0
go: downloading github.com/docker/docker-credential-helpers v0.6.3
go: downloading github.com/imdario/mergo v0.3.9
go: extracting sigs.k8s.io/sig-storage-lib-external-provisioner v4.0.0+incompatible
go: downloading go.opencensus.io v0.22.3
go: extracting google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece
go: extracting github.com/google/slowjam v0.0.0-20200530021616-df27e642fe7b
go: downloading github.com/googleapis/gnostic v0.3.0
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/golang/protobuf v1.4.2
go: downloading github.com/aws/aws-sdk-go v1.31.6
go: extracting github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd
go: extracting github.com/fatih/color v1.9.0
go: downloading github.com/russross/blackfriday/v2 v2.0.1
go: extracting github.com/imdario/mergo v0.3.9
go: downloading github.com/mitchellh/go-wordwrap v1.0.0
go: extracting github.com/modern-go/reflect2 v1.0.1
go: extracting github.com/docker/docker-credential-helpers v0.6.3
go: extracting github.com/mitchellh/go-wordwrap v1.0.0
go: downloading github.com/prometheus/client_golang v1.1.0
go: extracting go.opencensus.io v0.22.3
go: extracting github.com/mattn/go-isatty v0.0.12
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
go: extracting github.com/prometheus/client_golang v1.1.0
go: extracting github.com/russross/blackfriday/v2 v2.0.1
go: extracting github.com/googleapis/gnostic v0.3.0
go: extracting github.com/golang/protobuf v1.4.2
go: extracting github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
go: downloading github.com/sirupsen/logrus v1.6.0
go: downloading github.com/sayboras/dockerclient v0.0.0-20191231050035-015626177a97
go: downloading github.com/ulikunitz/xz v0.5.7
go: extracting github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading github.com/hooklift/iso9660 v0.0.0-20170318115843-1cf07e5970d8
go: downloading github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
go: downloading github.com/hashicorp/go-version v1.2.0
go: downloading github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
go: extracting github.com/hooklift/iso9660 v0.0.0-20170318115843-1cf07e5970d8
go: extracting github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
go: extracting github.com/hashicorp/go-version v1.2.0
go: extracting github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading github.com/mattn/go-colorable v0.1.6
go: downloading google.golang.org/protobuf v1.24.0
go: extracting github.com/sayboras/dockerclient v0.0.0-20191231050035-015626177a97
go: downloading github.com/VividCortex/ewma v1.1.1
go: extracting github.com/sirupsen/logrus v1.6.0
go: downloading github.com/hashicorp/go-cleanhttp v0.5.1
go: downloading golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1
go: extracting github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
go: extracting github.com/mattn/go-colorable v0.1.6
go: downloading k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab
go: extracting github.com/VividCortex/ewma v1.1.1
go: extracting golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1
go: extracting github.com/hashicorp/go-cleanhttp v0.5.1
go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: downloading github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c
go: extracting github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: extracting github.com/ulikunitz/xz v0.5.7
go: extracting k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab
go: downloading github.com/beorn7/perks v1.0.1
go: extracting github.com/beorn7/perks v1.0.1
go: downloading github.com/hashicorp/go-safetemp v1.0.0
go: extracting github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c
go: extracting github.com/hashicorp/go-safetemp v1.0.0
go: downloading github.com/intel-go/cpuid v0.0.0-20181003105527-1a4a6f06a1c6
go: extracting github.com/intel-go/cpuid v0.0.0-20181003105527-1a4a6f06a1c6
go: downloading github.com/prometheus/common v0.6.0
go: extracting google.golang.org/protobuf v1.24.0
go: extracting github.com/prometheus/common v0.6.0
go: downloading github.com/json-iterator/go v1.1.8
go: extracting github.com/json-iterator/go v1.1.8
go: downloading k8s.io/cluster-bootstrap v0.17.3
go: downloading k8s.io/component-base v0.17.3
go: downloading github.com/googleapis/gax-go v2.0.2+incompatible
go: downloading github.com/juju/errors v0.0.0-20190806202954-0232dcc7464d
go: downloading github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57
go: extracting k8s.io/cluster-bootstrap v0.17.3
go: extracting github.com/googleapis/gax-go v2.0.2+incompatible
go: downloading github.com/googleapis/gax-go/v2 v2.0.5
go: downloading github.com/c4milo/gotoolkit v0.0.0-20170318115440-bcc06269efa9
go: extracting k8s.io/component-base v0.17.3
go: extracting github.com/juju/errors v0.0.0-20190806202954-0232dcc7464d
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: extracting github.com/googleapis/gax-go/v2 v2.0.5
go: downloading github.com/docker/distribution v2.7.1+incompatible
go: extracting github.com/c4milo/gotoolkit v0.0.0-20170318115440-bcc06269efa9
go: downloading github.com/mitchellh/go-testing-interface v1.0.0
go: extracting github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading github.com/docker/go-units v0.4.0
go: extracting github.com/mitchellh/go-testing-interface v1.0.0
go: downloading github.com/miekg/dns v1.1.4
go: downloading k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a
go: extracting github.com/docker/go-units v0.4.0
go: downloading github.com/opencontainers/image-spec v1.0.1
go: extracting github.com/docker/distribution v2.7.1+incompatible
go: extracting github.com/miekg/dns v1.1.4
go: extracting github.com/opencontainers/image-spec v1.0.1
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading github.com/prometheus/procfs v0.0.5
go: extracting github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: extracting k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a
go: downloading github.com/google/go-cmp v0.4.1
go: extracting github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57
go: extracting github.com/google/go-cmp v0.4.1
go: extracting github.com/prometheus/procfs v0.0.5
go: downloading github.com/spf13/afero v1.2.2
go: downloading k8s.io/kube-proxy v0.17.3
go: extracting k8s.io/kube-proxy v0.17.3
go: downloading github.com/hashicorp/golang-lru v0.5.3
go: extracting github.com/spf13/afero v1.2.2
go: downloading k8s.io/kubelet v0.17.3
go: downloading github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96
go: extracting github.com/hashicorp/golang-lru v0.5.3
go: extracting k8s.io/kubelet v0.17.3
go: extracting github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96
go: extracting github.com/aws/aws-sdk-go v1.31.6
go: downloading github.com/jmespath/go-jmespath v0.3.0
go: extracting github.com/jmespath/go-jmespath v0.3.0
go: finding github.com/machine-drivers/machine v0.7.1-0.20200323212942-41eb826190d8
go: finding github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
go: finding github.com/pkg/errors v0.9.1
go: finding github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
go: finding github.com/google/slowjam v0.0.0-20200530021616-df27e642fe7b
go: finding github.com/pkg/profile v0.0.0-20161223203901-3a8809bd8a80
go: finding github.com/docker/go-units v0.4.0
go: finding github.com/spf13/cobra v1.0.0
go: finding github.com/olekukonko/tablewriter v0.0.4
go: finding k8s.io/client-go v0.17.3
go: finding github.com/blang/semver v3.5.0+incompatible
go: finding github.com/spf13/viper v1.7.0
go: finding github.com/hooklift/iso9660 v0.0.0-20170318115843-1cf07e5970d8
go: finding github.com/libvirt/libvirt-go v3.4.0+incompatible
go: finding golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37
go: finding github.com/mattn/go-runewidth v0.0.7
go: finding github.com/imdario/mergo v0.3.9
go: finding github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c
go: finding k8s.io/api v0.17.3
go: finding github.com/juju/mutex v0.0.0-20180619145857-d21b13acf4bf
go: finding github.com/spf13/pflag v1.0.5
go: finding github.com/mattn/go-isatty v0.0.12
go: finding k8s.io/apimachinery v0.17.3
go: finding golang.org/x/sys v0.0.0-20200523222454-059865788121
go: finding github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7
go: finding github.com/juju/errors v0.0.0-20190806202954-0232dcc7464d
go: finding github.com/c4milo/gotoolkit v0.0.0-20170318115440-bcc06269efa9
go: finding github.com/gogo/protobuf v1.3.1
go: finding github.com/afbjorklund/go-containerregistry v0.0.0-20200602203322-347d93793dc9
go: finding github.com/fsnotify/fsnotify v1.4.9
go: finding github.com/google/uuid v1.1.1
go: finding github.com/hashicorp/hcl v1.0.0
go: finding github.com/docker/cli v0.0.0-20200303162255-7d407207c304
go: finding github.com/pkg/browser v0.0.0-20160118053552-9302be274faa
go: finding github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b
go: finding github.com/magiconair/properties v1.8.1
go: finding github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
go: finding github.com/mitchellh/mapstructure v1.3.1
go: finding github.com/shirou/gopsutil v2.18.12+incompatible
go: finding github.com/pelletier/go-toml v1.8.0
go: finding github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
go: finding cloud.google.com/go/storage v1.8.0
go: finding github.com/google/gofuzz v1.0.0
go: finding k8s.io/klog v1.0.0
go: finding sigs.k8s.io/sig-storage-lib-external-provisioner v4.0.0+incompatible
go: finding github.com/spf13/afero v1.2.2
go: finding github.com/machine-drivers/docker-machine-driver-vmware v0.1.1
go: finding github.com/cpuguy83/go-md2man/v2 v2.0.0
go: finding github.com/otiai10/copy v1.0.2
go: finding github.com/spf13/cast v1.3.1
go: finding github.com/golang/protobuf v1.4.2
go: finding gopkg.in/inf.v0 v0.9.1
go: finding golang.org/x/text v0.3.2
go: finding cloud.google.com/go v0.57.0
go: finding github.com/docker/docker-credential-helpers v0.6.3
go: finding github.com/docker/distribution v2.7.1+incompatible
go: finding golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
go: finding github.com/cenkalti/backoff v2.2.1+incompatible
go: finding github.com/spf13/jwalterweatherman v1.1.0
go: finding github.com/googleapis/gnostic v0.3.0
go: finding github.com/russross/blackfriday/v2 v2.0.1
go: finding golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2
go: finding github.com/prometheus/client_golang v1.1.0
go: finding k8s.io/kubernetes v1.17.3
go: finding gopkg.in/yaml.v2 v2.3.0
go: finding github.com/subosito/gotenv v1.2.0
go: finding github.com/intel-go/cpuid v0.0.0-20181003105527-1a4a6f06a1c6
go: finding github.com/googleapis/gax-go/v2 v2.0.5
go: finding gopkg.in/ini.v1 v1.56.0
go: finding golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1
go: finding github.com/cheggaaa/pb/v3 v3.0.1
go: finding google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece
go: finding github.com/shurcooL/sanitized_anchor_name v1.0.0
go: finding github.com/opencontainers/go-digest v1.0.0-rc1
go: finding google.golang.org/api v0.25.0
go: finding google.golang.org/grpc v1.29.1
go: finding google.golang.org/protobuf v1.24.0
go: finding github.com/afbjorklund/go-getter v1.4.1-0.20190910175809-eb9f6c26742c
go: finding go.opencensus.io v0.22.3
go: finding k8s.io/component-base v0.17.3
go: finding github.com/VividCortex/ewma v1.1.1
go: finding k8s.io/kubectl v0.17.3
go: finding github.com/json-iterator/go v1.1.8
go: finding github.com/docker/go-connections v0.4.0
go: finding github.com/davecgh/go-spew v1.1.1
go: finding github.com/beorn7/perks v1.0.1
go: finding github.com/modern-go/reflect2 v1.0.1
go: finding github.com/fatih/color v1.9.0
go: finding github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
go: finding github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: finding github.com/mattn/go-colorable v0.1.6
go: finding github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd
go: finding github.com/opencontainers/image-spec v1.0.1
go: finding k8s.io/cluster-bootstrap v0.17.3
go: finding github.com/prometheus/common v0.6.0
go: finding github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: finding github.com/russross/blackfriday v1.5.3-0.20200218234912-41c5fccfd6f6
go: finding github.com/sayboras/dockerclient v0.0.0-20191231050035-015626177a97
go: finding golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
go: finding github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57
go: finding k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab
go: finding github.com/prometheus/procfs v0.0.5
go: finding github.com/sirupsen/logrus v1.6.0
go: finding sigs.k8s.io/yaml v1.1.0
go: finding github.com/matttproud/golang_protobuf_extensions v1.0.1
go: finding github.com/mitchellh/go-wordwrap v1.0.0
go: finding k8s.io/kube-proxy v0.17.3
go: finding k8s.io/kubelet v0.17.3
go: finding github.com/aws/aws-sdk-go v1.31.6
go: finding github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
go: finding github.com/miekg/dns v1.1.4
go: finding github.com/hashicorp/go-cleanhttp v0.5.1
go: finding github.com/hashicorp/golang-lru v0.5.3
go: finding github.com/hashicorp/go-safetemp v1.0.0
go: finding github.com/hashicorp/go-version v1.2.0
go: finding github.com/mitchellh/go-homedir v1.1.0
go: finding github.com/mitchellh/go-testing-interface v1.0.0
go: finding github.com/google/go-cmp v0.4.1
go: finding github.com/ulikunitz/xz v0.5.7
go: finding k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a
go: finding github.com/jmespath/go-jmespath v0.3.0
go: finding github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96
go: finding github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
go: downloading github.com/evanphx/json-patch v4.5.0+incompatible
go: downloading golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
go: downloading github.com/pmezard/go-difflib v1.0.0
go: extracting golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
go: extracting github.com/pmezard/go-difflib v1.0.0
go: extracting github.com/evanphx/json-patch v4.5.0+incompatible
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
go: finding github.com/evanphx/json-patch v4.5.0+incompatible
ERROR: logging before flag.Parse: I0628 23:09:58.438023   11847 translate.go:106] Setting Language to en-US ...
--- FAIL: TestGenerateDocs (0.01s)
    --- FAIL: TestGenerateDocs/start (0.00s)
        generate-docs_test.go:47: Docs are not updated. Please run `make generate-docs` to update commands documentation:   strings.Join({
              	... // 1794 identical bytes
              	"I manifest (default: auto)\n      --container-runtime string     ",
              	"     The container runtime to be used (docker, crio, containerd)",
            - 	" (default: docker)",
              	". (default \"docker\")\n      --cpus int                          N",
              	"umber of CPUs allocated to Kubernetes. (default 2)\n      --cri-s",
              	... // 9249 identical bytes
              }, "")
E0628 23:10:02.004027   11847 out.go:102] [unset errFile]: ! Not passing HTTP_PROXY=127.0.0.1:3128 to docker env.
E0628 23:10:02.004506   11847 out.go:102] [unset errFile]: ! Not passing HTTP_PROXY=localhost:3128 to docker env.
FAIL
coverage: 20.3% of statements
FAIL	k8s.io/minikube/cmd/minikube/cmd	3.657s
ok  	k8s.io/minikube/cmd/minikube/cmd/config	0.176s	coverage: 21.5% of statements
ok  	k8s.io/minikube/pkg/addons	0.067s	coverage: 53.3% of statements
ok  	k8s.io/minikube/pkg/drivers	0.011s	coverage: 19.6% of statements
ok  	k8s.io/minikube/pkg/drivers/hyperkit	0.005s	coverage: 77.3% of statements
ok  	k8s.io/minikube/pkg/drivers/kic/oci	0.009s	coverage: 0.0% of statements
ok  	k8s.io/minikube/pkg/drivers/kvm	0.026s	coverage: 2.3% of statements
ok  	k8s.io/minikube/pkg/minikube/bootstrapper	0.711s	coverage: 55.7% of statements
ok  	k8s.io/minikube/pkg/minikube/bootstrapper/bsutil	0.115s	coverage: 61.9% of statements
ok  	k8s.io/minikube/pkg/minikube/bootstrapper/bsutil/ktmpl	0.019s	coverage: 100.0% of statements
ok  	k8s.io/minikube/pkg/minikube/bootstrapper/images	0.008s	coverage: 84.2% of statements
ok  	k8s.io/minikube/pkg/minikube/cluster	0.070s	coverage: 16.7% of statements
ok  	k8s.io/minikube/pkg/minikube/command	0.023s	coverage: 4.3% of statements
ok  	k8s.io/minikube/pkg/minikube/config	0.127s	coverage: 70.1% of statements
ok  	k8s.io/minikube/pkg/minikube/cruntime	0.039s	coverage: 40.1% of statements
ok  	k8s.io/minikube/pkg/minikube/docker	0.022s	coverage: 20.8% of statements
ok  	k8s.io/minikube/pkg/minikube/driver	0.016s	coverage: 37.0% of statements
ok  	k8s.io/minikube/pkg/minikube/extract	0.008s	coverage: 58.8% of statements
ok  	k8s.io/minikube/pkg/minikube/image	0.019s	coverage: 3.0% of statements
ok  	k8s.io/minikube/pkg/minikube/kubeconfig	0.048s	coverage: 77.0% of statements
ok  	k8s.io/minikube/pkg/minikube/localpath	0.003s	coverage: 51.9% of statements
ok  	k8s.io/minikube/pkg/minikube/logs	0.042s	coverage: 1.3% of statements
ok  	k8s.io/minikube/pkg/minikube/machine	1.592s	coverage: 37.8% of statements
ok  	k8s.io/minikube/pkg/minikube/notify	0.012s	coverage: 92.9% of statements
ok  	k8s.io/minikube/pkg/minikube/out	0.051s	coverage: 67.4% of statements
ok  	k8s.io/minikube/pkg/minikube/perf	4.184s	coverage: 33.8% of statements
ok  	k8s.io/minikube/pkg/minikube/problem	0.008s	coverage: 91.7% of statements
ok  	k8s.io/minikube/pkg/minikube/proxy	0.007s	coverage: 77.0% of statements
ok  	k8s.io/minikube/pkg/minikube/registry	0.007s	coverage: 75.5% of statements
ok  	k8s.io/minikube/pkg/minikube/service	0.066s	coverage: 84.2% of statements
ok  	k8s.io/minikube/pkg/minikube/shell	0.023s	coverage: 97.1% of statements
ok  	k8s.io/minikube/pkg/minikube/storageclass	0.020s	coverage: 100.0% of statements
ok  	k8s.io/minikube/pkg/minikube/sysinit	0.021s	coverage: 6.5% of statements
ok  	k8s.io/minikube/pkg/minikube/translate	0.010s	coverage: 10.5% of statements
ok  	k8s.io/minikube/pkg/minikube/tunnel	1.646s	coverage: 64.2% of statements
ok  	k8s.io/minikube/pkg/util	1.032s	coverage: 77.9% of statements
ok  	k8s.io/minikube/pkg/util/lock	0.004s	coverage: 18.2% of statements
ok  	k8s.io/minikube/pkg/util/retry	0.010s	coverage: 0.0% of statements
FAIL
Makefile:273: recipe for target 'test' failed
make: *** [test] Error 32
TravisBuddy Request Identifier: b85ccf90-b994-11ea-a74d-ef5d1a577ce8

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

pkg/minikube/cruntime/cruntime.go Outdated Show resolved Hide resolved
@sunny-b sunny-b force-pushed the gracefully-fail-misspelled-runtime branch from 46061f1 to 9bcc587 Compare June 29, 2020 18:11
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@sunny-b
Copy link
Contributor Author

sunny-b commented Jun 29, 2020

Is it normal for the TestPreload integration test to fail? Is it flaky? I ran it locally and it passed fine. The logs in the failed test don't really show why it failed.

@afbjorklund
Copy link
Collaborator

The Docker Desktop VM on the Mac looks sad: failed to "StartContainer" for "etcd" with CreateContainerConfigError: "open /var/lib/kubelet/pods/6817a9c8a9aa865ba50269ccfa66b9f2/etc-hosts: read-only file system"

@medyagh
Copy link
Member

medyagh commented Jun 29, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 29, 2020
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.

we have some hardcoed check for ==crio
for example

https://github.com/medyagh/minikube/blob/3bc3ce95de5b77e2672d320f131beb8a761ec1ad/pkg/minikube/bootstrapper/kubeadm/kubeadm.go#L287

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

@medyagh medyagh requested a review from afbjorklund June 29, 2020 21:48
@minikube-pr-bot
Copy link

kvm2 Driver
docker Driver

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.

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

@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 29, 2020
@sunny-b sunny-b force-pushed the gracefully-fail-misspelled-runtime branch from 56fa2b9 to 2823815 Compare June 29, 2020 23:52
@sunny-b
Copy link
Contributor Author

sunny-b commented Jun 29, 2020

Okay I've updated it to use crio for backwards compatibility and convert cri-o to crio if passed in.

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [64.253704225 64.43437488900001 64.98731549]
Average time for minikube: 64.558464868

Times for Minikube (PR 8593): [63.232162820999996 65.924830108 62.582048011]
Average time for Minikube (PR 8593): 63.91301364666666

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8593) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.0-beta.0 on   |  0.062037 |           0.059590 |
| Debian 9.11                    |           |                    |
| * Using the kvm2 driver based  |  0.018897 |           0.018864 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.003052 |           0.002960 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 40.981383 |          40.782680 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.3 | 21.736012 |          21.210740 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  1.272435 |           1.734580 |
| components...                  |           |                    |
| * Enabled addons:              |  0.405107 |           0.021787 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.075900 |           0.078160 |
| configured to use "minikube"   |           |                    |
|                                |  0.003641 |           0.003654 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [25.405818044 24.660744447000003 26.772379979]
Average time for minikube: 25.61298082333333

Times for Minikube (PR 8593): [26.369950641 25.978270979 27.649858516999995]
Average time for Minikube (PR 8593): 26.66602671233333

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8593) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.0-beta.0 on   |  0.071096 |           0.072282 |
| Debian 9.11                    |           |                    |
| * Using the docker driver      |  0.002339 |           0.002346 |
| based on existing profile      |           |                    |
| * Starting control plane node  |  0.055259 |           0.056550 |
| minikube in cluster minikube   |           |                    |
| * Creating docker container    |  7.386961 |           7.755561 |
| (CPUs=2, Memory=3700MB) ...    |           |                    |
| * Preparing Kubernetes v1.18.3 | 17.112232 |          17.553465 |
| on Docker 19.03.2 ...          |           |                    |
| * Verifying Kubernetes         |  0.873708 |           1.097587 |
| components...                  |           |                    |
| * Enabled addons:              |  0.040821 |           0.060902 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.064507 |           0.061139 |
| configured to use "minikube"   |           |                    |
|                                |  0.006058 |           0.006194 |
+--------------------------------+-----------+--------------------+

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.

Thank you for this PR

@medyagh medyagh merged commit 9e35037 into kubernetes:master Jun 30, 2020
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. ok-to-test Indicates a non-member PR verified by an org member that 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.

do not crash, when missplelled container runtime
7 participants