Issue #6964
closedmigrated errata's pulp3_version_href is not correct after re-migration
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:
- 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"]}]}]}]}
- delete the pulp2 repos and re-run the migration plan
- maybe repeat step 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.
Updated by ipanova@redhat.com over 4 years ago
To reproduce:
- migrate repo
- re-create repo/or just remove the repo
- run migration plan again
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
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
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
Updated by ttereshc over 4 years ago
- Status changed from ASSIGNED to MODIFIED
Applied in changeset pulp:pulp-2to3-migration|e9253a2fc4747e809f2cce8d4bd9134773c42992.
Updated by ttereshc over 4 years ago
Applied in changeset pulp-2to3-migration|e9253a2fc4747e809f2cce8d4bd9134773c42992.
Updated by ttereshc over 4 years ago
Applied in changeset pulp:pulp-2to3-migrate|e9253a2fc4747e809f2cce8d4bd9134773c42992.
Updated by ttereshc over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
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