Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1934209

Summary: pulp3: Make migration no-op if there are no changes in plan and everything is migrated
Product: Red Hat Satellite Reporter: Tanya Tereshchenko <ttereshc>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: bmbouter, ggainey, ipanova, pcreech, rchan, smallamp, ttereshc
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 13:11:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tanya Tereshchenko 2021-03-02 17:19:48 UTC
Motivation
----------

With improvements introduced earlier, the migration re-runs are much faster now, at the same time when no changes are made and everything is migrated, it still can take time to re-run a migration which is supposed to be no-op. It is mostly noticeable on the large systems with many repositories in Pulp 2 (e.g. dogfood, ~39K pulp2 repos).


Suggested solution
------------------

 - compare if the previous and current plans are exactly the same
 - allow pre-migration to run to check for any changes in Pulp 2 (not sure if there any shortcuts available there)
 - if the plan is the same and everything has been migrated, finish the task and do not proceed with content migration or repo version creation.

Comment 2 pulp-infra@redhat.com 2021-03-02 18:06:03 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2021-03-02 18:06:05 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2021-03-06 00:15:19 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2021-03-09 22:07:34 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 6 pulp-infra@redhat.com 2021-03-09 23:06:49 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 7 pulp-infra@redhat.com 2021-03-09 23:06:51 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 9 Lai 2021-03-29 18:27:23 UTC
Steps to retest

1. on a large db with content, run migration command
2. Once finished, run migration command again.
3. Add another yum repo and sync
4. Run migration command.
5. Compare migration command run from 2 and 4

Expected result.
2. Migration should finish faster.
5. Migration should finish faster, but not as fast as 2

Actual result
2. Migration finished faster
5. Migration finished faster, but had a few minutes to a few seconds later than 2.


I tested steps 1-2 and got a result of 2 hours for the first run, then 2 minutes for the 2nd run on a customer db.  This proves that migration is a lot faster.

Verified on 6.9.0_19.1 with python3-pulp-2to3-migration-0.10.0-1.el7pc.noarch

Comment 12 errata-xmlrpc 2021-04-21 13:11:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.9 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1313