Project

Profile

Help

Issue #1271

closed

Depending on the order of loading data files, Crane sometimes will redirect v2 repository requests to the v1 section of Pulp

Added by rbarlow over 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Crane:
master
Platform Release:
2.8.0
Target Release - Crane:
2.0.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:

Description

I discovered a problem with Crane where it sometimes redirects requests to /v2/<path> to /pulp/docker/v1/<path> for repositories that do not contain v1 images. This is due to how the data files are loaded and does depend on the loading order. If the v1 repository file is loaded after the v2 repository file for the same repository, the "if image_ids" check here will be False:

https://github.com/pulp/crane/blob/b80325dfcf0e4957a87003997ab2e4a569938b01/crane/data.py#L138

This False evaluation will cause the function to insert the v1 data file into the v2 data structure. This will later cause Crane to redirect /v2/ requests to /v1/.

Also available in: Atom PDF