Skip to content

behavior of ping is against Docker v2 API Spec #198

@jabielecki

Description

@jabielecki

Per Docker v2 API Specification:

When a 200 OK or 401 Unauthorized response is returned, the “Docker-Distribution-API-Version” header should be set to “registry/2.0”. Clients may require this header value to determine if the endpoint serves this API.

So the implicit assumption is that if you only want to ping, the 401 is as good a response as 200.

However, currently reg regards 401 as a ping error.

reg version
reg:
 version     : 
 git hash    : 
 go version  : go1.13.4
 go compiler : gc
 platform    : linux/amd64


reg tags quay.io/kubernetes-ingress-controller/nginx-ingress-controller
INFO[0000] domain: quay.io                              
INFO[0000] server address: quay.io                      
Get https://quay.io/v2/: http: non-successful response (status=401 body="{\"error\": \"Invalid bearer token format\"}")


reg tags --skip-ping quay.io/kubernetes-ingress-controller/nginx-ingress-controller
INFO[0000] domain: quay.io                              
INFO[0000] server address: quay.io                      
0
0.10.0
0.10.1

Impact: when using quay.io registry (and also azure cloud registry and other less popular ones) every user needs to wildly troubleshoot until they discover they need --skip-ping option. That's confusing.

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