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 1943317 - Pulp3 Migration after migration reset doesn't import errata info from pulp3
Summary: Pulp3 Migration after migration reset doesn't import errata info from pulp3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.9.1
Assignee: Justin Sherrill
QA Contact: Tasos Papaioannou
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-25 19:11 UTC by Justin Sherrill
Modified: 2021-04-26 17:37 UTC (History)
2 users (show)

Fixed In Version: tfm-rubygem-katello-3.18.1.23-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-26 17:36:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 32210 0 Normal New Pulp3 Migration after migration reset doesn't import errata info from pulp3 2021-03-25 19:12:37 UTC
Red Hat Product Errata RHBA-2021:1371 0 None None None 2021-04-26 17:37:08 UTC

Description Justin Sherrill 2021-03-25 19:11:08 UTC
Steps:

1) sync a repo with at least one errata
2) migrate the content (foreman-maintain content prepare)
3) reset the migration   (foreman-maintain content migration-reset)
4) remigrate  (foreman-maintain content prepare)
5) check un-migrated errata:

 Katello::RepositoryErratum.where(erratum_pulp3_href: nil).count

This should be zero, but ends up being all RepositoryErratum entries.

The cause of this is this line:
<pre>
        last_migration_time = last_successful_migration_time
        offset = 0
        limit = SETTINGS[:katello][:pulp][:bulk_load_size]
        response = pulp2_content_api.list(pulp2_content_type_id: 'erratum', offset: offset, limit: limit, pulp2_last_updated__gt: last_migration_time)
</pre> 

last_successful_migration_time doesn't seem to take into account a reset action (where everything needs to be re-imported)

Comment 1 Justin Sherrill 2021-03-25 19:12:39 UTC
Created from redmine issue https://projects.theforeman.org/issues/32210

Comment 2 Justin Sherrill 2021-03-25 19:12:40 UTC
Upstream bug assigned to None

Comment 3 Bryan Kearney 2021-03-26 00:02:20 UTC
Upstream bug assigned to jsherril

Comment 4 Bryan Kearney 2021-03-26 00:02:22 UTC
Upstream bug assigned to jsherril

Comment 6 Tasos Papaioannou 2021-04-09 19:06:15 UTC
Verified on 6.9.1 snap 1.0.

Comment 11 errata-xmlrpc 2021-04-26 17:36:58 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 (Satellite 6.9.1 Async Bug Fix Update), 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/RHBA-2021:1371


Note You need to log in before you can comment on or make changes to this bug.