Closed devjgm closed 1 month ago
Seems like this could be useful:
https://github.com/GoogleContainerTools/kaniko/blob/master/README.md#--registry-mirror
I tried adding --registry-mirror=mirror.gcr.io
and did not work. From what I could gather from the error messages, mirror.gcr.io
does not host a number of images we need (Fedora:33, or Ubuntu:bionic).
There is a way to create our own mirror and host it, but that seems very involved.
This one is similar enough that I think we should consolidate them:
error building image: GET https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/ae/aefd7f02ae24739b95f77c488de70465c54653f394097b9859acede976c80e03/data?verify=REDACTED: unsupported status code 502; body: <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>cloudflare</center>
</body>
</html>
I figured out why --registry-mirror=mirror.gcr.io
does not work: it just holds "latest" of each popular image, bummer.
A different solution may involve using the "warmer" program:
https://github.com/GoogleContainerTools/kaniko/tree/master/cmd/warmer
This can download the base image to /cache
which could be a shared volume between the warmer
and the kaniko
steps.
There are a couple of additional twists:
fedora:33
or ubuntu:bionic
requires a roundtrip to registry.github.io
because those versions may (and do) change.registry.github.io
are what fails with 5xx
errorsFROM fedora:33@sha256:ab9c680acef5a053cf2a6bddcebfa9674576d5104927180ef27a35d2dbab15fc
/cache
directory really cached as a GCS tarball (sure would be nice if kaniko did that instead).No repeats in 90d, closing. I suspect we will need to reopen though.
Step #0: error building image: GET https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/dc/dcf4d4bef137f695d11ed187ba6a135362dca3de36955c4da0905d596ce521bc/data?verify=REDACTED: unexpected status code 502 Bad Gateway: <html>
Step #0: <head><title>502 Bad Gateway</title></head>
Step #0: <body>
Step #0: <center><h1>502 Bad Gateway</h1></center>
Step #0: <hr><center>cloudflare</center>
Step #0: </body>
Step #0: </html>
error building image: error building stage: failed to get filesystem from image: Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/7c/7c3b88808835aa80f1ef7f03083c5ae781d0f44e644537cd72de4ce6c5e62e00/data?verify=1647437859-y6QANhynFYEw1DOP0fkes9J%2F4eY%3D": read tcp 192.168.10.3:54192->104.18.124.25:443: read: connection reset by peer
Nice find. Can't hurt. Let's give it a shot: https://github.com/googleapis/google-cloud-cpp/pull/8558
90d without a repeat, closing.
CONSOLE_LOG_URL https://console.cloud.google.com/cloud-build/builds;region=us-east1/bdf61932-1f3a-48f0-9a11-aec2059c0b25;tab=detail?project=cloud-cpp-testing-resources RAW_LOG_URL https://storage.googleapis.com/cloud-cpp-community-publiclogs/logs/google-cloud-cpp/main/c33459e640286d3ff0c7a51c1f66bc6e0d2acb36/demo-debian-bullseye-demo-install/log-bdf61932-1f3a-48f0-9a11-aec2059c0b25.txt
Slightly different error message, but I think the same root cause. I am changing the title to be more generic.
Step #0: error building image: error building stage: failed to execute command: extracting fs from image: read tcp 192.168.10.2:52280->142.251.162.207:443: read: connection reset by peer
error building image: error building stage: failed to execute command: extracting fs from image: read tcp 192.168.10.2:57314->74.125.26.207:443: read: connection reset by peer
FWIW: this seems to be:
https://github.com/GoogleContainerTools/kaniko/issues/1717
This may also be of use, but requires a lot more configuration:
https://cloud.google.com/artifact-registry/docs/repositories/remote-repo
error building image: error building stage: failed to execute command: extracting fs from image: unexpected EOF
Attempting to fix upstream (https://github.com/GoogleContainerTools/kaniko/pull/2837)
error building image: error building stage: failed to execute command: extracting fs from image: read tcp 192.168.10.2:60614->108.177.12.207:443: read: connection reset by peer
I tried :(
CONSOLE_LOG_URL https://console.cloud.google.com/cloud-build/builds;region=us-east1/8f5cd35a-5c37-4d18-8f82-97283c00d633;tab=detail?project=cloud-cpp-testing-resources RAW_LOG_URL https://storage.googleapis.com/cloud-cpp-community-publiclogs/logs/google-cloud-cpp/main/94355b0efb9e087c241c2be3cca062e818d5a7dd/fedora-latest-bazel-tsan/log-8f5cd35a-5c37-4d18-8f82-97283c00d633.txt
Step #0: error building image: error building stage: failed to execute command: extracting fs from image: read tcp 192.168.10.2:45946->74.125.196.207:443: read: connection reset by peer
Build FAILURE: libcxx-ci https://console.cloud.google.com/cloud-build/builds;region=us-east1/aea5600b-a3a6-4159-a043-3ae3d52d8dac?project=936212892354
Haven't seen in 90d; closing.
Log: https://pantheon.corp.google.com/cloud-build/builds;region=global/a7edfd7e-c43e-43c2-a3d6-3ddba4565084;step=0?project=cloud-cpp-testing-resources
It looks like our kaniko build step that was creating our image got a 503 when fetching one of the layers from docker.com. I'm not sure if there's anything we can do to fix this. I think not.
But I'm filing this issue anyway so we can track if it's a common issue.