Project

Profile

Help

Issue #1271

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

Added by rbarlow about 5 years ago. Updated over 1 year 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/.

Associated revisions

Revision 5e8cb092 View on GitHub
Added by rbarlow about 5 years ago

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

History

#1 Updated by rbarlow about 5 years ago

  • Status changed from ASSIGNED to POST

#2 Updated by rbarlow about 5 years ago

  • Version - Crane set to master
  • Target Release - Crane set to master

#3 Updated by jortel@redhat.com about 5 years ago

  • Triaged changed from No to Yes

#4 Updated by rbarlow about 5 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#5 Updated by rbarlow almost 5 years ago

  • Target Release - Crane changed from master to 2.0.0

#6 Updated by rbarlow almost 5 years ago

  • Status changed from MODIFIED to 5

#7 Updated by rbarlow over 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
  • Platform Release set to 2.8.0

#8 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF