Open mrled opened 6 months ago
A friendly reminder that this issue had no activity for 30 days.
I'm having a similar situation where the docker registry used with --cache-from and --cache-to runs in the local network with http://. Is it possible to disable the ping to https:// with an option? In my case the check for each layer wastes 30 seconds until the https ping runs into a timeout.
I also tried with BUILD_REGISTRY_SOURCES='{"insecureRegistries":["docker-registry.namespace.svc.cluster.local"]}'
but without success.
$ buildah version
Version: 1.31.3
Go Version: go1.20.12
Image Spec: 1.1.0-rc.3
Runtime Spec: 1.1.0-rc.3
CNI Spec: 1.0.0
libcni Version: v1.1.2
image Version: 5.26.2
Git Commit:
Built: Wed Mar 13 11:28:44 2024
OS/Arch: linux/amd64
BuildPlatform: linux/amd64
Extract from the buildah debug log:
time="2024-11-19T08:11:37Z" level=debug msg="Copying source image //my-docker-registry.demo-dev-tekton.svc.cluster.local/cache:01ed03a741b46d77ed009d903877d5f8e33d858e4602d80530905a2dd0a1d28c to destination image [vfs@/home/build/.local/share/containers/storage+/build-tmp/containers-user-1000/containers]my-docker-registry.demo-dev-tekton.svc.cluster.local/cache:01ed03a741b46d77ed009d903877d5f8e33d858e4602d80530905a2dd0a1d28c"
time="2024-11-19T08:11:37Z" level=debug msg="BUILD_REGISTRY_SOURCES set \"{\\\"insecureRegistries\\\":[\\\"my-docker-registry.demo-dev-tekton.svc.cluster.local\\\"]}\""
time="2024-11-19T08:11:37Z" level=debug msg="BUILD_REGISTRY_SOURCES set \"{\\\"insecureRegistries\\\":[\\\"my-docker-registry.demo-dev-tekton.svc.cluster.local\\\"]}\""
time="2024-11-19T08:11:37Z" level=debug msg="Using registries.d directory /etc/containers/registries.d"
time="2024-11-19T08:11:37Z" level=debug msg="Trying to access \"my-docker-registry.demo-dev-tekton.svc.cluster.local/cache:01ed03a741b46d77ed009d903877d5f8e33d858e4602d80530905a2dd0a1d28c\""
time="2024-11-19T08:11:37Z" level=debug msg="No credentials matching my-docker-registry.demo-dev-tekton.svc.cluster.local/cache found in /build-tmp/containers-user-1000/containers/containers/auth.json"
time="2024-11-19T08:11:37Z" level=debug msg="No credentials matching my-docker-registry.demo-dev-tekton.svc.cluster.local/cache found in /home/build/.config/containers/auth.json"
time="2024-11-19T08:11:37Z" level=debug msg="No credentials matching my-docker-registry.demo-dev-tekton.svc.cluster.local/cache found in /home/build/.docker/config.json"
time="2024-11-19T08:11:37Z" level=debug msg="No credentials matching my-docker-registry.demo-dev-tekton.svc.cluster.local/cache found in /home/build/.dockercfg"
time="2024-11-19T08:11:37Z" level=debug msg="No credentials for my-docker-registry.demo-dev-tekton.svc.cluster.local/cache found"
time="2024-11-19T08:11:37Z" level=debug msg=" No signature storage configuration found for my-docker-registry.demo-dev-tekton.svc.cluster.local/cache:01ed03a741b46d77ed009d903877d5f8e33d858e4602d80530905a2dd0a1d28c, using built-in default file:///home/build/.local/share/containers/sigstore"
time="2024-11-19T08:11:37Z" level=debug msg="Looking for TLS certificates and private keys in /etc/docker/certs.d/my-docker-registry.demo-dev-tekton.svc.cluster.local"
time="2024-11-19T08:11:37Z" level=debug msg="GET https://my-docker-registry.demo-dev-tekton.svc.cluster.local/v2/"
time="2024-11-19T08:12:07Z" level=debug msg="Ping https://my-docker-registry.demo-dev-tekton.svc.cluster.local/v2/ err Get \"https://my-docker-registry.demo-dev-tekton.svc.cluster.local/v2/\": dial tcp 198.18.53.65:443: i/o timeout (&url.Error{Op:\"Get\", URL:\"https://my-docker-registry.demo-dev-tekton.svc.cluster.local/v2/\", Err:(*net.OpError)(0xc001494000)})"
time="2024-11-19T08:12:07Z" level=debug msg="GET http://my-docker-registry.demo-dev-tekton.svc.cluster.local/v2/"
time="2024-11-19T08:12:07Z" level=debug msg="Ping http://my-docker-registry.demo-dev-tekton.svc.cluster.local/v2/ status 200"
time="2024-11-19T08:12:07Z" level=debug msg="GET http://my-docker-registry.demo-dev-tekton.svc.cluster.local/v2/cache/manifests/01ed03a741b46d77ed009d903877d5f8e33d858e4602d80530905a2dd0a1d28c"
time="2024-11-19T08:12:07Z" level=debug msg="Content-Type from manifest GET is \"application/vnd.oci.image.manifest.v1+json\""
Description
When a registry is configured as insecure in
/etc/containers/registries.conf
, buildah first trieshttps://
and waits a full 30 seconds for it to time out before trying HTTP.Steps to reproduce the issue:
/etc/containers/registries.conf
buildah --debug pull registry.registry.svc.cluster.local/repository/clustergit:latest2
Describe the results you received:
In this debug output, the newlines in the middle are where it paused for 30 seconds.
(The final error, about "manifest unknown", is expected in this case. The only issue I'm reporting is the HTTPS timeout before trying HTTP, not the unknown image.)
Describe the results you expected:
It should try HTTP immediately, since it's configured as an insecure registry.
Output of
rpm -q buildah
orapt list buildah
:I'm on Alpine, so:
Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:This happens with podman too, for what it's worth.
*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: