Actions
Test #4535
closedPulp Crane not returning correct headers
Description
Sync the following docker repo
feed: https://quay.io/
upstream_name: openshift-release-dev/ocp-release
Pulp Crane
Check out the following output when syncing v1 content
$ curl --head -L https://<fqdn>:5000/v2/default_organization-custom-ocp/manifests/4.0.0-0
HTTP/1.1 302 FOUND
Date: Mon, 04 Feb 2019 16:29:14 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux)
Content-Length: 437
Location: https://<fqdn>/pulp/docker/v2/fe117c3c-5820-4406-ad34-8404062b8458/manifests/1/4.0.0-0
Content-Type: text/html; charset=utf-8
HTTP/1.1 200 OK
Date: Mon, 04 Feb 2019 16:29:15 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux)
Last-Modified: Wed, 30 Jan 2019 16:28:40 GMT
ETag: "e5e-580af6711a0c7"
Accept-Ranges: bytes
Content-Length: 3678
Docker-Distribution-API-Version: registry/2.0
Quay:
Now compare it to the same in quay
$ curl --head -L https://quay.io/v2/coreos/etcd/manifests/latest
HTTP/2 200
server: nginx/1.14.2
date: Mon, 04 Feb 2019 16:29:41 GMT
content-type: application/vnd.docker.distribution.manifest.v1+prettyjws
content-length: 6655
docker-content-digest: sha256:5b6691b7225a3f77a5a919a81261bbfb31283804418e187f7116a0a9ef65d21d
x-frame-options: DENY
strict-transport-security: max-age=63072000; preload
Notice how content-type is set to application/vnd.docker.distribution.manifest.v1+prettyjws in the case of quay, while its blank for pulp-crane.
This causes issues in clients pulling this information.
Related issues
Updated by bherring over 5 years ago
- Copied from Issue #4384: Pulp Crane not returning correct headers added
Updated by bherring over 5 years ago
Notes¶
Verified in 2.20 and 2.19RC that Content-Type is now populated vs older builds:
2-master, 3/28/2019¶
[root@rhel76-4535 ~]# curl -k --head -L https://localhost/pulp/docker/v2/a/manifests/1/4.0.0-0 ; pulp-admin status
HTTP/1.1 200 OK
Date: Wed, 27 Mar 2019 19:45:49 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips mod_wsgi/3.4 Python/2.7.5
Last-Modified: Wed, 27 Mar 2019 19:13:36 GMT
ETag: "e5e-585183c0950ef"
Accept-Ranges: bytes
Content-Length: 3678
Docker-Distribution-API-Version: registry/2.0
Content-Type: application/vnd.docker.distribution.manifest.v1+prettyjws
+----------------------------------------------------------------------+
Status of the server
+----------------------------------------------------------------------+
Api Version: 2
Database Connection:
Connected: True
Known Workers:
_id: scheduler@rhel76-4535
_ns: workers
Last Heartbeat: 2019-03-27T19:45:46Z
_id: resource_manager@rhel76-4535
_ns: workers
Last Heartbeat: 2019-03-27T19:45:48Z
_id: reserved_resource_worker-0@rhel76-4535
_ns: workers
Last Heartbeat: 2019-03-27T19:45:48Z
Messaging Connection:
Connected: True
Versions:
Platform Version: 2.20a1
[root@rhel76-4535 ~]#
2.19RC¶
[root@rhel76-219rc 1554129581.28]# curl -k --head -L https://localhost/pulp/docker/v2/test/manifests/1/4.0.0-0 | grep -i "Content-Type"; pulp-admin status
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 3678 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Content-Type: application/vnd.docker.distribution.manifest.v1+prettyjws
+----------------------------------------------------------------------+
Status of the server
+----------------------------------------------------------------------+
Api Version: 2
Database Connection:
Connected: True
Known Workers:
_id: scheduler@rhel76-219rc
_ns: workers
Last Heartbeat: 2019-04-01T16:29:47Z
_id: resource_manager@rhel76-219rc
_ns: workers
Last Heartbeat: 2019-04-01T16:29:48Z
_id: reserved_resource_worker-0@rhel76-219rc
_ns: workers
Last Heartbeat: 2019-04-01T16:29:44Z
Messaging Connection:
Connected: True
Versions:
Platform Version: 2.19c1
[root@rhel76-219rc 1554129581.28]#
2.17 Comparison¶
[root@rhel76-217 ~]# curl -k --head -L https://localhost/pulp/docker/v2/a/manifests/1/4.0.0-0 ; pulp-admin status
HTTP/1.1 200 OK
Date: Thu, 28 Mar 2019 11:43:39 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips mod_wsgi/3.4 Python/2.7.5
Last-Modified: Thu, 28 Mar 2019 11:41:44 GMT
ETag: "e5e-5852609df8897"
Accept-Ranges: bytes
Content-Length: 3678
Docker-Distribution-API-Version: registry/2.0
+----------------------------------------------------------------------+
Status of the server
+----------------------------------------------------------------------+
Api Version: 2
Database Connection:
Connected: True
Known Workers:
_id: scheduler@rhel76-217
_ns: workers
Last Heartbeat: 2019-03-28T11:43:37Z
_id: resource_manager@rhel76-217
_ns: workers
Last Heartbeat: 2019-03-28T11:43:34Z
_id: reserved_resource_worker-0@rhel76-217
_ns: workers
Last Heartbeat: 2019-03-28T11:43:39Z
Messaging Connection:
Connected: True
Versions:
Platform Version: 2.17.1
[root@rhel76-217 ~]#
Updated by bherring over 5 years ago
Additional References¶
https://docs.docker.com/registry/spec/manifest-v2-2/
https://docs.docker.com/registry/spec/manifest-v2-1/
The content-type header type of the manifest returned in pulp 2 it is schema1, schema2 and manifest list specifically https://github.com/pulp/pulp_docker/blob/3.2-release/plugins/etc/httpd/conf.d/pulp_docker.conf
Added by bherring over 5 years ago
Updated by bherring over 5 years ago
Applied in changeset pulp:pulp-2-tests|596ba78fdbb0b287632819be975df3fa0a0f394b.
Updated by bherring over 5 years ago
- Status changed from MODIFIED to CLOSED - COMPLETE
Actions
The Docker v2 was not exposing the correct data for Content-Type.
The lack of information was causing issues with clients pulling information from Crane.
Adding tests using standard
DOCKER
test libraries to ensureContent-Type
for any of the tags returns the appropriate information.closes #4535