Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Fixed distributor re-run when it was only pre-migrated and then changed
Browse files Browse the repository at this point in the history
The following situation is fixed now:
  * pre-migration for a distributor happened, but migration did not
  * then pulp2 distributor changed
  * then migration plan was run again

closes #8195
https://pulp.plan.io/issues/8195
  • Loading branch information
goosemania committed Feb 6, 2021
1 parent cfc8ec1 commit 1e98eef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/8195.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed distributor re-migration case when it was changed in Pulp 2 between migration plan runs.
3 changes: 3 additions & 0 deletions pulp_2to3_migration/app/plugin/rpm/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ def needs_new_publication(cls, pulp2distributor):
bool: True, if a publication needs to be recreated; False if no changes are needed
"""
if not pulp2distributor.pulp3_publication:
return True

new_checksum_type = pulp2distributor.pulp2_config.get('checksum_type')
current_checksum_type = pulp2distributor.pulp3_publication.cast().metadata_checksum_type

Expand Down

0 comments on commit 1e98eef

Please sign in to comment.