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

Don't attempt to pull docker images on relaunch #4129

Merged

Conversation

marcosdiez
Copy link
Contributor

@marcosdiez marcosdiez commented Apr 22, 2019

Hi again!
If we are relaunching a cluster, we already have pulled the images (and if they ever got deleted, it's not the end of the world). That saves startup time!

The fact is, since I am physically far from the k8s.gcr.io servers, a simple time sudo kubeadm config images pull --config "/var/lib/kubeadm.yaml" takes around 30 seconds if the images are already there.

From an AWS server in the US the same command takes only 5 seconds, but, well, it's still a performance improvement without any downside :)

Please don't think that I have the worse connection on earth and hence I am an edge case. Quite the opposite. I am just physically far for k8s.gcr.io and therefore the latency is high`.

@k8s-ci-robot k8s-ci-robot added 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. labels Apr 22, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @marcosdiez. 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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 22, 2019
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@tstromberg
Copy link
Contributor

@minikube-bot OK to test

1 similar comment
@tstromberg
Copy link
Contributor

@minikube-bot OK to test

@RA489
Copy link

RA489 commented Apr 25, 2019

@marcosdiez please squash the commits to one

@@ -574,6 +570,11 @@ func bootstrapCluster(bs bootstrapper.Bootstrapper, r cruntime.Manager, runner b
exit.WithLogEntries("Error restarting cluster", err, logs.FindProblems(r, bs, runner))
}
return
} else {
console.OutStyle("pulling", "Pulling images required by Kubernetes %s ...", kc.KubernetesVersion)
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this change - but there is a bit more subtlety here that is missing. This will also need to handle the case where the pre-existing cluster is a different version of Kubernetes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here in Brazil it really saves me 30 seconds. So I will later send you will a PR to check if the server is being upgraded or not.

I read that you aim to make minikube launch in less than a minute.

With this patch (and all the others you have merged), here it loads in 53 seconds. How long does it take to load for you ?

@tstromberg tstromberg self-assigned this Apr 25, 2019
@tstromberg tstromberg added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 25, 2019
@tstromberg
Copy link
Contributor

Any idea on how much time this saves? I want to make sure the added complexity is worth it.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 25, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: marcosdiez
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: tstromberg

If they are not already assigned, you can assign the PR to them by writing /assign @tstromberg in a comment when ready.

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

@marcosdiez
Copy link
Contributor Author

marcosdiez commented Apr 25, 2019

@tstromberg Implementing the check was easier than I thought. And I only had to add 4 lines, one of them being blank. I also rebased, as requested by @RA489 .

@tstromberg
Copy link
Contributor

@minikube-bot OK to test

@tstromberg tstromberg merged commit 7538ed8 into kubernetes:master May 1, 2019
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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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.

5 participants