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.