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

fix: incorrect finalImg affecting downloading kic form github assets #20316

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

ComradeProgrammer
Copy link
Member

fix: fix incorrect finalImg in cache.go

When testing the new "download kicbase image from github release" feature, I found that it cannot work. This PR fixes the bugs and make it work now.

Before:

😄  minikube v1.35.0 on Darwin 14.6.1 (arm64)
✨  Automatically selected the docker driver. Other choices: qemu2, ssh
📌  Using Docker Desktop driver with root privileges
👍  Starting "minikube" primary control-plane node in "minikube" cluster
🚜  Pulling base image v0.0.46 ...
💾  Downloading Kubernetes v1.32.0 preload ...
❗  minikube cannot pull kicbase image from any docker registry, and is trying to download kicbase tarball from github release page via HTTP.
❗  It's very likely that you have an internet issue. Please ensure that you can access the internet at least via HTTP, directly or with proxy. Currently your proxy configure is:

    > preloaded-images-k8s-v18-v1...:  314.92 MiB / 314.92 MiB  100.00% 32.58 M
    > kicbase-v0.0.46-arm64.tar:  1.14 GiB / 1.14 GiB  100.00% 43.47 MiB p/s 27
E0127 00:43:34.001999   56798 cache.go:233] Error downloading kic artifacts:  failed to load kic base image into docker: tarball: tag kicbase not found in tarball
🔥  Creating docker container (CPUs=2, Memory=6100MB) ...
🤦  StartHost failed, but will try again: creating host: create: creating: setting up container node: preparing volume for minikube container: docker run --rm --name minikube-preload-sidecar --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --entrypoint /usr/bin/test -v minikube:/var gcr.io/k8s-minikube/kicbase:v0.0.46@sha256:fd2d445ddcc33ebc5c6b68a17e6219ea207ce63c005095ea1525296da2d1a279 -d /var/lib: exit status 125
stdout:

stderr:
Unable to find image 'gcr.io/k8s-minikube/kicbase:v0.0.46@sha256:fd2d445ddcc33ebc5c6b68a17e6219ea207ce63c005095ea1525296da2d1a279' locally
docker: Error response from daemon: Get "https://gcr.io/v2/": dialing gcr.io:443 with direct connection: connecting to 0.0.0.1:443: dial tcp 0.0.0.1:443: connect: no route to host.
See 'docker run --help'.

After:

./out/minikube start         
😄  minikube v1.35.0 on Darwin 14.6.1 (arm64)
✨  Automatically selected the docker driver. Other choices: qemu2, ssh
📌  Using Docker Desktop driver with root privileges
👍  Starting "minikube" primary control-plane node in "minikube" cluster
🚜  Pulling base image v0.0.46 ...
💾  Downloading Kubernetes v1.32.0 preload ...
❗  minikube cannot pull kicbase image from any docker registry, and is trying to download kicbase tarball from github release page via HTTP.
❗  It's very likely that you have an internet issue. Please ensure that you can access the internet at least via HTTP, directly or with proxy. Currently your proxy configure is:

    > preloaded-images-k8s-v18-v1...:  314.92 MiB / 314.92 MiB  100.00% 35.88 M
    > kicbase-v0.0.46-arm64.tar:  1.14 GiB / 1.14 GiB  100.00% 33.31 MiB p/s 35
❗  minikube was unable to download gcr.io/k8s-minikube/kicbase:v0.0.46, but successfully downloaded kicbase/stable:v0.0.46 as a fallback image
🔥  Creating docker container (CPUs=2, Memory=6100MB) ...
🐳  Preparing Kubernetes v1.32.0 on Docker 27.4.1 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔗  Configuring bridge CNI (Container Networking Interface) ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass

🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

@k8s-ci-robot k8s-ci-robot requested a review from prezha January 27, 2025 00:31
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 27, 2025
@ComradeProgrammer
Copy link
Member Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jan 27, 2025
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20316) |
+----------------+----------+---------------------+
| minikube start | 52.4s    | 54.1s               |
| enable ingress | 18.1s    | 18.1s               |
+----------------+----------+---------------------+

Times for minikube start: 52.1s 51.0s 53.4s 52.3s 53.1s
Times for minikube (PR 20316) start: 52.6s 52.9s 55.5s 55.0s 54.5s

Times for minikube ingress: 18.2s 15.6s 19.0s 18.6s 19.1s
Times for minikube (PR 20316) ingress: 18.1s 19.1s 19.1s 18.1s 16.1s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20316) |
+----------------+----------+---------------------+
| minikube start | 23.0s    | 23.0s               |
| enable ingress | 12.5s    | 12.7s               |
+----------------+----------+---------------------+

Times for minikube (PR 20316) start: 20.6s 24.5s 21.8s 24.0s 24.3s
Times for minikube start: 25.2s 21.9s 21.5s 21.4s 24.9s

Times for minikube ingress: 12.3s 12.3s 12.3s 12.8s 12.8s
Times for minikube (PR 20316) ingress: 12.8s 12.3s 12.3s 12.8s 13.3s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20316) |
+----------------+----------+---------------------+
| minikube start | 20.8s    | 22.0s               |
| enable ingress | 26.1s    | 24.4s               |
+----------------+----------+---------------------+

Times for minikube start: 20.7s 20.7s 21.2s 20.4s 21.0s
Times for minikube (PR 20316) start: 22.9s 20.1s 23.4s 22.7s 20.8s

Times for minikube ingress: 22.9s 22.8s 22.8s 22.8s 39.3s
Times for minikube (PR 20316) ingress: 22.8s 22.8s 22.8s 30.8s 22.9s

@minikube-pr-bot
Copy link

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate
Docker_Linux_crio_arm64 (2 failed) TestAddons/serial/GCPAuth/FakeCredentials(gopogh) 0.00% (chart)
Docker_Linux_containerd_arm64 (2 failed) TestScheduledStopUnix(gopogh) 9.80% (chart)

Besides the following environments also have failed tests:

To see the flake rates of all tests by environment, click here.

@medyagh medyagh changed the title fix: fix incorrect finalImg in cache.go fix: incorrect finalImg in cache.go Jan 27, 2025
@medyagh medyagh changed the title fix: incorrect finalImg in cache.go fix: incorrect finalImg affecting downloading kic form github assets Jan 27, 2025
if !downloadOnly && driver.IsDocker(cc.Driver) {
if finalImg, err = download.CacheToDaemon("kicbase"); err == nil {
if finalImg, err = download.CacheToDaemon(fmt.Sprintf("kicbase/stable:%s", kicbaseVersion)); err == nil {
Copy link
Member

Choose a reason for hiding this comment

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

can you put in the PR description (the verbose log) for First and Second Run...so on the Second run we should make sure minikube is NOT re-downloading the github assets and not re-loading it in the daemon...

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.

after the PR desc update, we could merge this

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 27, 2025
@medyagh
Copy link
Member

medyagh commented Jan 28, 2025

/lgtm

@medyagh medyagh merged commit c590592 into kubernetes:master Jan 28, 2025
36 of 46 checks passed
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 28, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ComradeProgrammer, medyagh

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants