Skip to content

Reduce load on ratelimited docker.io#5189

Merged
estesp merged 3 commits intocontainerd:masterfrom
TBBle:reduce-load-on-ratelimited-docker.io
Mar 14, 2021
Merged

Reduce load on ratelimited docker.io#5189
estesp merged 3 commits intocontainerd:masterfrom
TBBle:reduce-load-on-ratelimited-docker.io

Conversation

@TBBle
Copy link
Copy Markdown
Contributor

@TBBle TBBle commented Mar 13, 2021

I noticed in #4399 that integration tests were failing due to rate-limiting when pulling images from docker.io.

Since we have a nice, small, and useful multi-arch/multi-os image at k8s.gcr.io/pause:3.4.1 that we already use elsewhere in the test suite, I switched to using that instead of various docker.io-based images (mostly docker.io/library/busybox variants) when all we're doing is pulling an image to manipulate it.

This also lets us run a few tests on Windows that were previously excluded due to relying on docker.io/library/busybox, which is multi-arch but only Linux-os.

Tests that depend on testImage (docker.io/library/alpine:latest on Linux, mcr.microsoft.com/windows/nanoserver on Windows) are unchanged, as they are generally starting containers (except TestConvert) and we'll still need to pull something consistent to run container tests on anyway.

Looking at the CI runs, this change possibly added 40s to a few of the Linux Integration runs (but weirdly, not all) and the Windows Integration run gained a minute or two. I'm not sure if this is because gcr.k8s.io is slower, or if the image is larger (it shouldn't be significantly larger, based on docker inspect) or if it's just coincidental. Edit: I have other PRs taking longer to run today, that don't have this change, so this is probably not related.

If we want to optimise image-pull times further for CI runs, we could look into using the GitHub registry and pushing a known, fixed image or images there for the pull tests. That seems out of scope for this change though.

@k8s-ci-robot
Copy link
Copy Markdown

Hi @TBBle. Thanks for your PR.

I'm waiting for a containerd 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.

Details

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.

@TBBle TBBle force-pushed the reduce-load-on-ratelimited-docker.io branch from ba6f6ed to cefba71 Compare March 13, 2021 01:38
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 13, 2021

Build succeeded.

@dims
Copy link
Copy Markdown
Member

dims commented Mar 13, 2021

/ok-to-test

@TBBle
Copy link
Copy Markdown
Contributor Author

TBBle commented Mar 13, 2021

Oh yuck. A test I didn't change TestImagePullSomePlatforms failed because (I suppose) now it's pulling the same image as TestImagePullAllPlatforms and so the data's in the content store left over from the earlier test.

I went with using a different version of the pause image for that TestImagePullSomePlatforms, rather than trying to work out how to delete the data from the content store at the end of TestImagePullAllPlatforms, since I want to keep that image in the content store for the rest of the image-manipulation tests to use.

(Also, I wasn't sure if there was an easy API to clear that data out of the content store, and I didn't want to over-complicate the test at this point).

TBBle added 2 commits March 13, 2021 13:08
This reduces the need to pull random images from docker.io, and should
greatly reduce the tendancy to hit their hourly rate-limit during
integration test runs.

TestImagePullSomePlatforms uses k8s.gcr.io/pause:3.2 so that it does not
see the content pulled by TestImagePullAllPlatforms. This image is
multi-arch, but not multi-os.

Signed-off-by: Paul "TBBle" Hampson <[email protected]>
Now that they are using a multi-arch image, they should work on Windows
like they work elsewhere.

This also means non-AMD64 platforms do this test with their native
platform version, not the linux/amd64 platform version.

Signed-off-by: Paul "TBBle" Hampson <[email protected]>
@TBBle TBBle force-pushed the reduce-load-on-ratelimited-docker.io branch from cefba71 to 5cfc4a8 Compare March 13, 2021 02:11
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 13, 2021

Build succeeded.

@TBBle TBBle marked this pull request as ready for review March 13, 2021 02:36
Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit 6f94b15 into containerd:master Mar 14, 2021
@TBBle TBBle deleted the reduce-load-on-ratelimited-docker.io branch March 14, 2021 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants