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

Prevent downloading duplicate binaries already present in preload #11461

Merged
merged 8 commits into from
May 27, 2021

Conversation

andriyDev
Copy link
Contributor

fixes #9098.

Before

$ minikube start --download-only
πŸ˜„  minikube v1.20.0 on Debian rodete
✨  Automatically selected the docker driver. Other choices: kvm2, ssh, none
πŸ‘  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
πŸ’Ύ  Downloading Kubernetes v1.20.2 preload ...
    > preloaded-images-k8s-v10-v1...: 491.71 MiB / 491.71 MiB  100.00% 22.69 Mi
    > kubelet.sha256: 64 B / 64 B [--------------------------] 100.00% ? p/s 0s
    > kubeadm.sha256: 64 B / 64 B [--------------------------] 100.00% ? p/s 0s
    > kubectl.sha256: 64 B / 64 B [--------------------------] 100.00% ? p/s 0s
    > gcr.io/k8s-minikube/kicbase...: 358.10 MiB / 358.10 MiB  100.00% 13.37 Mi
    > kubeadm: 37.40 MiB / 37.40 MiB [-------------] 100.00% 19.08 MiB p/s 2.2s
    > kubectl: 38.37 MiB / 38.37 MiB [-------------] 100.00% 17.89 MiB p/s 2.3s
    > kubelet: 108.73 MiB / 108.73 MiB [-----------] 100.00% 20.55 MiB p/s 5.5s
βœ…  Download complete!

After

$ minikube start --download-only
πŸ˜„  minikube v1.20.0 on Debian rodete
✨  Automatically selected the docker driver. Other choices: kvm2, none, ssh
πŸ‘  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
πŸ’Ύ  Downloading Kubernetes v1.20.2 preload ...
    > preloaded-images-k8s-v10-v1...: 491.71 MiB / 491.71 MiB  100.00% 21.03 Mi
    > gcr.io/k8s-minikube/kicbase...: 358.09 MiB / 358.10 MiB  100.00% 14.94 Mi
    > kubectl.sha256: 64 B / 64 B [--------------------------] 100.00% ? p/s 0s
    > kubectl: 38.37 MiB / 38.37 MiB [-------------] 100.00% 19.40 MiB p/s 2.2s
βœ…  Download complete!

Note kubectl is still downloaded since the host requires it to be present. This does mean that downloading a Linux preload on a Linux host will still duplicate downloads for kubectl.

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

Hi @andriyDev. 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 May 19, 2021
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 19, 2021
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

pkg/minikube/download/preload.go Outdated Show resolved Hide resolved
@medyagh medyagh changed the title Prevent downloading duplicate binaries already present in preload wip: Prevent downloading duplicate binaries already present in preload May 19, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 19, 2021
@medyagh
Copy link
Member

medyagh commented May 19, 2021

marking as WIP please remove WIP once ready for another review

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 20, 2021
@andriyDev andriyDev changed the title wip: Prevent downloading duplicate binaries already present in preload Prevent downloading duplicate binaries already present in preload May 20, 2021
@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 May 20, 2021
pkg/minikube/node/cache.go Show resolved Hide resolved
@andriyDev andriyDev requested a review from medyagh May 20, 2021 20:23
pkg/minikube/download/preload.go Outdated Show resolved Hide resolved
pkg/minikube/download/preload.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2021
@sharifelgamal
Copy link
Collaborator

/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 May 26, 2021
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11461) |
+----------------+----------+---------------------+
| minikube start | 50.1s    | 53.4s               |
| enable ingress | 35.0s    | 34.8s               |
+----------------+----------+---------------------+

Times for minikube start: 51.5s 49.8s 52.4s 48.2s 48.3s
Times for minikube (PR 11461) start: 49.9s 53.7s 54.5s 55.8s 53.4s

Times for minikube ingress: 34.8s 36.3s 34.7s 33.8s 35.3s
Times for minikube (PR 11461) ingress: 34.3s 33.8s 33.8s 36.8s 35.4s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11461) |
+----------------+----------+---------------------+
| minikube start | 23.3s    | 23.0s               |
| enable ingress | 28.4s    | 28.8s               |
+----------------+----------+---------------------+

Times for minikube ingress: 28.0s 29.0s 29.0s 28.0s 28.0s
Times for minikube (PR 11461) ingress: 28.0s 29.0s 29.0s 30.0s 28.0s

Times for minikube start: 22.9s 22.8s 24.2s 22.7s 23.8s
Times for minikube (PR 11461) start: 23.5s 22.9s 23.0s 23.0s 22.5s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11461) |
+----------------+----------+---------------------+
| minikube start | 45.6s    | 44.7s               |
| enable ingress |          |                     |
+----------------+----------+---------------------+

Times for minikube start: 48.3s 48.0s 43.7s 44.0s 44.0s
Times for minikube (PR 11461) start: 47.8s 44.6s 43.9s 43.7s 43.4s

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 26, 2021
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11461) |
+----------------+----------+---------------------+
| minikube start | 49.2s    | 48.7s               |
| enable ingress | 35.7s    | 35.0s               |
+----------------+----------+---------------------+

Times for minikube start: 54.1s 47.0s 48.0s 47.8s 48.9s
Times for minikube (PR 11461) start: 46.4s 47.5s 50.8s 50.7s 48.0s

Times for minikube (PR 11461) ingress: 34.3s 36.3s 34.3s 35.8s 34.3s
Times for minikube ingress: 34.2s 42.2s 33.7s 33.8s 34.8s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11461) |
+----------------+----------+---------------------+
| minikube start | 22.2s    | 22.1s               |
| enable ingress | 30.3s    | 30.7s               |
+----------------+----------+---------------------+

Times for minikube start: 21.6s 22.6s 22.2s 21.9s 22.5s
Times for minikube (PR 11461) start: 21.5s 22.3s 22.0s 21.9s 22.7s

Times for minikube ingress: 29.0s 30.5s 33.0s 28.5s 30.5s
Times for minikube (PR 11461) ingress: 27.5s 37.0s 31.5s 29.0s 28.5s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11461) |
+----------------+----------+---------------------+
| minikube start | 45.9s    | 44.1s               |
| enable ingress |          |                     |
+----------------+----------+---------------------+

Times for minikube start: 50.4s 43.2s 47.3s 45.1s 43.7s
Times for minikube (PR 11461) start: 42.8s 43.2s 47.0s 43.4s 44.0s

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 26, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andriyDev, sharifelgamal

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

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11461) |
+----------------+----------+---------------------+
| minikube start | 49.0s    | 50.8s               |
| enable ingress | 34.5s    | 34.4s               |
+----------------+----------+---------------------+

Times for minikube ingress: 33.8s 33.8s 35.3s 34.2s 35.2s
Times for minikube (PR 11461) ingress: 35.3s 33.8s 34.3s 33.2s 35.3s

Times for minikube start: 48.0s 52.1s 47.3s 51.0s 46.6s
Times for minikube (PR 11461) start: 51.8s 52.3s 51.3s 47.5s 50.9s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11461) |
+----------------+----------+---------------------+
| minikube start | 22.5s    | 22.2s               |
| enable ingress | 31.3s    | 29.1s               |
+----------------+----------+---------------------+

Times for minikube start: 22.2s 22.6s 22.2s 22.6s 23.2s
Times for minikube (PR 11461) start: 22.1s 22.1s 22.4s 22.4s 22.0s

Times for minikube ingress: 29.5s 30.5s 36.5s 29.0s 31.0s
Times for minikube (PR 11461) ingress: 30.0s 29.0s 29.0s 28.5s 29.0s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11461) |
+----------------+----------+---------------------+
| minikube start | 43.2s    | 44.8s               |
| enable ingress |          |                     |
+----------------+----------+---------------------+

Times for minikube start: 49.2s 32.4s 43.7s 47.1s 43.8s
Times for minikube (PR 11461) start: 43.8s 44.0s 47.4s 44.5s 44.4s

@medyagh medyagh merged commit 1c1e447 into kubernetes:master May 27, 2021
@andriyDev andriyDev deleted the RepeatBinaryDownloads branch June 1, 2021 16:08
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. 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.

minikube start --download-only downloads duplicate kubeadm/kubelet binaries
6 participants