Project

Profile

Help

Issue #6964

closed

migrated errata's pulp3_version_href is not correct after re-migration

Added by jsherril@redhat.com over 4 years ago. Updated about 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 75
Quarter:

Description

After a migration with errata, if i query the migrated content api:

# curl  --cert /etc/pki/katello/certs/pulp-client.crt  --key /etc/pki/katello/private/pulp-client.key https://`hostname`//pulp/api/v3/pulp2content/6a06b9d9-0cc5-4c28-aea5-ad4ff9f76a48/

I get:

{
  "pulp_href": "/pulp/api/v3/pulp2content/6a06b9d9-0cc5-4c28-aea5-ad4ff9f76a48/",
  "pulp_created": "2020-06-11T14:41:18.350552Z",
  "pulp2_id": "7c084d6e-073e-4310-94e3-5ab06b66ef1e",
  "pulp2_content_type_id": "erratum",
  "pulp2_last_updated": 1591886473,
  "pulp2_storage_path": null,
  "downloaded": false,
  "pulp3_content": "/pulp/api/v3/content/rpm/advisories/19182792-dc5f-4200-84ca-78a7791d8ad4/",
  "pulp3_repository_version": "Noneversions/1/"
}

notice that the pulp3_repository_version is not a valid version.

This only happens after re-migration (and it almost appears that it happens on the 3rd migration of the same plan). In this caes the repos are deleted between each run:

  1. create repos in pulp2 and run a migration plan similar to this:

{"plugins"=>[{"type"=>"rpm", "repositories"=>[{"name"=>"pulp-uuid-rhel_6_x86_64", "repository_versions"=>[{"pulp2_repository_id"=>"pulp-uuid-rhel_6_x86_64", "pulp2_distributor_repository_ids"=>["pulp-uuid-rhel_6_x86_64"]}], "pulp2_importer_repository_id"=>"pulp-uuid-rhel_6_x86_64"}, {"name"=>"Published LIbrary view-355376805-405955044", "repository_versions"=>[{"pulp2_repository_id"=>"8_view1_archive", "pulp2_distributor_repository_ids"=>["8_composite_version1", "8_composite_version1_archive", "8_view1", "8_view1_archive"]}]}]}]}

  1. delete the pulp2 repos and re-run the migration plan
  2. maybe repeat step 2?
Actions #1

Updated by jsherril@redhat.com over 4 years ago

  • Description updated (diff)
Actions #2

Updated by ttereshc over 4 years ago

This happens to the orphaned content in pulp 3 because pulp3_repository is not set properly when repo is recreated in pulp2. To reproduce, do not remove orphaned content in pulp 2 between the migration runs.

Actions #3

Updated by ipanova@redhat.com over 4 years ago

To reproduce:

  1. migrate repo
  2. re-create repo/or just remove the repo
  3. run migration plan again
Actions #4

Updated by ipanova@redhat.com over 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com
  • Triaged changed from No to Yes
  • Sprint set to Sprint 75

Added by ttereshc over 4 years ago

Revision e9253a2f | View on GitHub

Set pulp3_repo relation for all the cases, including remigration.

As a side effect, also fixes the case when a repo name differs from the pulp2 one.

closes #6964 https://pulp.plan.io/issues/6964

closes #6640 https://pulp.plan.io/issues/6640

closes #6966 https://pulp.plan.io/issues/6966

Added by ttereshc over 4 years ago

Revision e9253a2f | View on GitHub

Set pulp3_repo relation for all the cases, including remigration.

As a side effect, also fixes the case when a repo name differs from the pulp2 one.

closes #6964 https://pulp.plan.io/issues/6964

closes #6640 https://pulp.plan.io/issues/6640

closes #6966 https://pulp.plan.io/issues/6966

Added by ttereshc over 4 years ago

Revision e9253a2f | View on GitHub

Set pulp3_repo relation for all the cases, including remigration.

As a side effect, also fixes the case when a repo name differs from the pulp2 one.

closes #6964 https://pulp.plan.io/issues/6964

closes #6640 https://pulp.plan.io/issues/6640

closes #6966 https://pulp.plan.io/issues/6966

Actions #5

Updated by ttereshc over 4 years ago

  • Status changed from ASSIGNED to MODIFIED
Actions #8

Updated by ttereshc about 4 years ago

  • Sprint/Milestone set to 0.2.0
Actions #9

Updated by ttereshc about 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF