Skip to content

Fails for some repositories with quay.io as a registry backend #288

@wk8

Description

@wk8

Describe the bug

Configuring quay.io as a registry backend doesn't work for certain repositories, as queries to get manifests for specific tags fail.

To Reproduce
On any k8s cluster, apply the following manifest, which is basically the dev helm manifest but with quay.io configured as a catch-all namespace: quay_repro.txt.

Then exec into an agent pod, and try to

curl -v localhost:8081/v2/prometheus/haproxy-exporter/manifests/v0.10.0

That will fail, and the build-index's pod will have a log line similar to:

2020-10-26T02:54:41.930Z	INFO	handler/handler.go:98	500 GET /tags/prometheus/haproxy-exporter:v0.10.0 storage: backend client: parse manifest v2: unmarshal manifest: mediaType in manifest should be 'application/vnd.docker.distribution.manifest.v2+json' not ''

and trying to pull that image (for example from the host node, or from a DinD container on the same node) will fail:

/ # docker pull localhost:8081/prometheus/haproxy-exporter:v0.10.0
Error response from daemon: received unexpected HTTP status: 500 Internal Server Error

Note that pulling directly from quay.io works just fine:

docker pull quay.io/prometheus/haproxy-exporter:v0.10.0

In contrast, getting manifests for latest instead of a specific tag works just fine:

curl -v localhost:8081/v2/prometheus/haproxy-exporter/manifests/latest

and so pulling host.docker.internal:8081/prometheus/haproxy-exporter:latest works too.

Expected behavior

With the configuration above, I'd expect that as long as docker pull quay.io/XYZ works, then we should be able to docker pull localhost:8081/XYZ just the same.

Environments
k8s

Additional context
Seems to affect all versions, including master.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions