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

Make kind load docker-image only load if the image is not already on the nodes #380

Closed
bouk opened this issue Mar 13, 2019 · 8 comments
Closed
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone

Comments

@bouk
Copy link

bouk commented Mar 13, 2019

Currently kind load docker-image always tars up the image and sends it, even if the nodes already contains the exact image. To make image loading faster, Kind should look at the image ID and only load over the image if the nodes don't have it yet.

@BenTheElder
Copy link
Member

So the tar loading on the node should more or less skip reading images that are already present, for large enough images skipping the tar on the host after checking may still speed up a bit though.

/kind feature
/priority important-longterm

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Mar 13, 2019
@aojea
Copy link
Contributor

aojea commented Mar 20, 2019

/assign

@k8s-ci-robot
Copy link
Contributor

@aojea: GitHub didn't allow me to assign the following users: aojea.

Note that only kubernetes-sigs members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign

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.

@rohansingh
Copy link

I'm not sure if this should be a separate issue, but I think kind should also only load layers that are not already present on any given node. Here's an example of that kind of incremental load logic:
https://github.com/bazelbuild/rules_docker/blob/master/container/incremental_load.sh.tpl

I'm using that internally to wrap kind load image-archive and only providing layers that are missing in a single-node cluster, and it is significantly faster when pushing changes.

@rohansingh
Copy link

Here's the key insight from that script, by the way:

Docker elides layer reads from the tarball when it already has a copy of the layer with the same basis as it has within the tarball. This means that once we have found the lowest layer in our image of which Docker is unaware we must load all of the remaining layers. So to determine existence, iterate through the layers attempting to load the image without it's tarball. As soon as one fails, break and synthesize a "docker save" tarball of all of the remaining layers.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 18, 2019
@aojea
Copy link
Contributor

aojea commented Jun 18, 2019

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 18, 2019
@BenTheElder
Copy link
Member

#382 fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

6 participants