Actions
Issue #1271
closedDepending on the order of loading data files, Crane sometimes will redirect v2 repository requests to the v1 section of Pulp
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/.
Added by rbarlow over 8 years ago
Updated by rbarlow over 8 years ago
- Status changed from ASSIGNED to POST
Updated by rbarlow over 8 years ago
- Version - Crane set to master
- Target Release - Crane set to master
Updated by rbarlow over 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 5e8cb09260f38796a21b04103405da096dc8b74b.
Updated by rbarlow about 8 years ago
- Target Release - Crane changed from master to 2.0.0
Updated by rbarlow almost 8 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
- Platform Release set to 2.8.0
Actions
Use the data file's version to determine where to put repo data.
This commit fixes a bug that caused Crane to sometimes redirect /v2/ requests to /v1/ publishes in Pulp.
https://pulp.plan.io/issues/1271
fixes #1271