Project

Profile

Help

Issue #3139

closed

Sync from Crane fails with "Not Found"

Added by twaugh over 6 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
3.0.1
Platform Release:
2.15.0
Target Release - Docker:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 29
Quarter:

Description

When syncing from a Crane repository (containing a manifest list) into a Pulp Docker repository, the sync task fails with "Not Found". I think this is because of the way it requests the image manifests within the manifest list:
https://github.com/pulp/pulp_docker/blob/pulp-docker-3.0.2-1/plugins/pulp_docker/plugins/importers/sync.py#L271

When no Accept header is set, Crane redirects to the schema-1 storage location, even though the digest may be for a schema-2 image manifests. As a result, the request fails.

Instead, the Accept header should be set to the mediaType provided in the manifest list for that manifest.

Related: https://pulp.plan.io/issues/2992

Also available in: Atom PDF