Bug 1973245 - undefined method `pulp3_remote_href' for nil:NilClass (NoMethodError) when migrating during content view publish
Summary: undefined method `pulp3_remote_href' for nil:NilClass (NoMethodError) when mi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.9.6
Assignee: Ian Ballou
QA Contact: Gaurav Talreja
URL:
Whiteboard:
Depends On:
Blocks: 1957813
TreeView+ depends on / blocked
 
Reported: 2021-06-17 13:38 UTC by Matthias Dellweg
Modified: 2022-02-21 06:16 UTC (History)
7 users (show)

Fixed In Version: tfm-rubygem-katello-3.18.1.38-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-21 14:37:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33150 0 Normal New undefined method `pulp3_remote_href' for nil:NilClass (NoMethodError) when migrating during content view publish 2021-08-05 20:28:12 UTC
Red Hat Product Errata RHBA-2021:3628 0 None None None 2021-09-21 14:37:41 UTC

Description Matthias Dellweg 2021-06-17 13:38:06 UTC
Description of problem:
Recently created repository leads to corrupted migrated remote. (Pulp2 to Pulp3 switch)

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create sync and publish a repository
2. migrate from Pulp 2 to Pulp 3
3.

Actual results:
An error is raised:
undefined method `pulp3_remote_href' for nil:NilClass (NoMethodError)

Expected results:


Additional info:

Comment 3 Ian Ballou 2021-07-26 20:22:45 UTC
Created redmine issue https://projects.theforeman.org/issues/33150 from this bug

Comment 9 Gaurav Talreja 2021-09-17 16:20:25 UTC
Verified.

Tested on Satellite 6.9.6 Snap 2.0

Steps:
1. Create 1-2 large repos/sync RH repos like rhel-server-rhscl-7-rpms and put that repos in a content view.
2. Publish the content view and immediately start the Pulp 2 -> 3 migration with,
    # satellite-maintain content prepare
3. Watch production logs for messages/warnings to run the migration again.

Observations:
Repositories belonging to that CV with ID/name unmigrated due to being created during the Pulp 3 migration.

And following logs are seen in production logs after the migration completes,

2021-09-17T07:57:43 [W|app|] Library repository with ID 1 and name Red Hat Ansible Engine 2.9 RPMs for Red Hat Enterprise Linux 7 Server x86_64 unmigrated due to being associated with an actively-publishing content view.  The migration will need to be run again.
2021-09-17T07:57:43 [W|app|] Repositories belonging to Content View with ID 2 and name test_cv unmigrated due to being created during the Pulp 3 migration.  The migration will need to be run again.
2021-09-17T07:57:43 [W|app|] Library repository with ID 2 and name Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server unmigrated due to being associated with an actively-publishing content view.  The migration will need to be run again.
2021-09-17T07:57:43 [W|app|] Repositories belonging to Content View with ID 2 and name test_cv unmigrated due to being created during the Pulp 3 migration.  The migration will need to be run again.


Thanks, Ian Ballou for helping with the detailed steps.
While discussing with him, we noticed when the migration plan is empty, all repositories get migrated and CV's repositories receive version_hrefs if there is no error during the migration, so raised another BZ[1] to track this issue.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2005392

Comment 14 errata-xmlrpc 2021-09-21 14:37:26 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.6 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:3628


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