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

Handle image digests in node status and image GC #25088

Merged
merged 1 commit into from
May 8, 2016

Conversation

ncdc
Copy link
Member

@ncdc ncdc commented May 3, 2016

Start including Docker image digests in the node status and consider image digests during image
garbage collection.

@kubernetes/rh-cluster-infra @kubernetes/sig-node @smarterclayton

Fixes #23917

@ncdc ncdc added sig/node Categorizes an issue or PR as relevant to SIG Node. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 3, 2016
@vishh
Copy link
Contributor

vishh commented May 3, 2016

On clusters where CI is run, there will be a lot of images. Every field in the API around images will take up significant cluster bandwidth.

@k8s-github-robot k8s-github-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 3, 2016
@ncdc
Copy link
Member Author

ncdc commented May 3, 2016

You only see data in RepoDigests if you have pulled an image by digest. Otherwise, this PR is a no-op.

@ncdc
Copy link
Member Author

ncdc commented May 3, 2016

In other words, this would only affect the CI clusters if the tests are pulling by images by digest.

@ncdc ncdc force-pushed the image-digests branch from 7203c67 to 95f5bb7 Compare May 3, 2016 17:52
@ncdc
Copy link
Member Author

ncdc commented May 3, 2016

@yifan-gu how do image references work in rkt - are there both tags and immutable identifiers, or ... ?

@smarterclayton
Copy link
Contributor

And note - if you are pulling by digest, the current code is broken
(doesn't cache the digest, doesn't benefit scheduling at all). So this
completes the feature that only worked in the one case, and makes the cost
we are already paying more palatable.

On Tue, May 3, 2016 at 1:50 PM, Andy Goldstein notifications@github.com
wrote:

In other words, this would only affect the CI clusters if the tests are
pulling by images by digest.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#25088 (comment)

@smarterclayton
Copy link
Contributor

The changes lgtm, but would want sign off from the GC or node side.

@yujuhong
Copy link
Contributor

yujuhong commented May 3, 2016

I think @vishh still has concerns that the image list could go unbounded (#23355). This is not a problem specific to the digests, but could get worse with the digests.
Maybe we can handle that first?

@yifan-gu
Copy link
Contributor

yifan-gu commented May 3, 2016

@yifan-gu how do image references work in rkt - are there both tags and immutable identifiers, or ... ?

@ncdc When the image is already on disk, we can reference it by the sha512, which is the image id here https://github.com/kubernetes/kubernetes/blob/v1.3.0-alpha.3/pkg/kubelet/rkt/image.go#L93

That's the hash of the image, so equivalent to the docker digest here, though we can't pull by that today... cc @philip @jonboulle

@vishh
Copy link
Contributor

vishh commented May 3, 2016

I'd like to look at this PR before it gets merged.

On Tue, May 3, 2016 at 4:42 PM, Yifan Gu notifications@github.com wrote:

@yifan-gu https://github.com/yifan-gu how do image references work in
rkt - are there both tags and immutable identifiers, or ... ?
@ncdc https://github.com/ncdc When the image is already on disk, we can
reference it by the sha512, which is the image id here
https://github.com/kubernetes/kubernetes/blob/v1.3.0-alpha.3/pkg/kubelet/rkt/image.go#L93


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#25088 (comment)

@yujuhong yujuhong assigned vishh and unassigned yujuhong May 4, 2016
@yujuhong
Copy link
Contributor

yujuhong commented May 4, 2016

I'd like to look at this PR before it gets merged.

Assigned to you so it's easier to keep track.

@ncdc
Copy link
Member Author

ncdc commented May 4, 2016

I can split this into 2 PRs if that would make it easier - 1 for image GC, and 1 for node status.

@smarterclayton
Copy link
Contributor

smarterclayton commented May 4, 2016 via email

@vishh
Copy link
Contributor

vishh commented May 4, 2016

@smarterclayton It is not theoretically unbounded. In reality though, the number of entries could be couple of hundreds on clusters than run CI workloads. The main use case for exposing images in the API is to lower pod startup latency. If we can assume that image pulling latency is mainly correlated with image size, then we can place a cap on the number of images that we will expose via NodeStatus and expose the largest set of images.

@ncdc
Copy link
Member Author

ncdc commented May 4, 2016

@vishh can we do that cap in a separate PR?

@smarterclayton
Copy link
Contributor

Sure, that makes sense to me.

@vishh
Copy link
Contributor

vishh commented May 4, 2016

@ncdc Yeah a separate PR makes sense.

@vishh
Copy link
Contributor

vishh commented May 5, 2016

LGTM

@vishh vishh added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 5, 2016
@ncdc ncdc added this to the v1.3 milestone May 5, 2016
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 6, 2016
Start including Docker image digests in the node status and consider image digests during image
garbage collection.
@ncdc ncdc force-pushed the image-digests branch from 95f5bb7 to f091ea5 Compare May 7, 2016 10:52
@ncdc
Copy link
Member Author

ncdc commented May 7, 2016

@vishh rebased, please take another look - thanks!

@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 7, 2016
@vishh vishh added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 7, 2016
@k8s-bot
Copy link

k8s-bot commented May 8, 2016

GCE e2e build/test passed for commit f091ea5.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented May 8, 2016

GCE e2e build/test passed for commit f091ea5.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 071295c into kubernetes:master May 8, 2016
@ncdc ncdc deleted the image-digests branch February 13, 2017 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. 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.

8 participants