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 about 7 years ago. Updated over 3 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/.

Added by rbarlow about 7 years ago

Revision 5e8cb092

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

Actions #1

Updated by rbarlow about 7 years ago

  • Status changed from ASSIGNED to POST
Actions #2

Updated by rbarlow about 7 years ago

  • Version - Crane set to master
  • Target Release - Crane set to master
Actions #3

Updated by jortel@redhat.com about 7 years ago

  • Triaged changed from No to Yes
Actions #4

Updated by rbarlow about 7 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #5

Updated by rbarlow over 6 years ago

  • Target Release - Crane changed from master to 2.0.0
Actions #6

Updated by rbarlow over 6 years ago

  • Status changed from MODIFIED to 5
Actions #7

Updated by rbarlow over 6 years ago

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

Updated by bmbouter over 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF