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 1994651 - Pulp migration failed with "NoMethodError: undefined method `pulp_id' for nil:NilClass"
Summary: Pulp migration failed with "NoMethodError: undefined method `pulp_id' for nil...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.9.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: 6.9.6
Assignee: Justin Sherrill
QA Contact: Cole Higgins
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-17 15:52 UTC by Devendra Singh
Modified: 2021-09-29 14:35 UTC (History)
6 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:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33278 0 None None None 2021-08-17 23:48:29 UTC
Foreman Issue Tracker 33279 0 None None None 2021-08-18 00:04:41 UTC
Red Hat Product Errata RHBA-2021:3628 0 None None None 2021-09-21 14:37:32 UTC

Description Devendra Singh 2021-08-17 15:52:35 UTC
Description of problem: Pulp migration failed with "NoMethodError: undefined method `pulp_id' for nil:NilClass"


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

How reproducible:
always with

Steps to Reproduce:
1. Restore the 6.9.z satellite by using a specific customers database backup.
2. Satellite restored successfully.
3. Run the pulp migration and it gets failed with "NoMethodError: undefined method `pulp_id' for nil:NilClass" error.

Actual results:
pulp migration failed due to "NoMethodError: undefined method `pulp_id' for nil:NilClass" error.

Expected results:
pulp migration should be completed successfully.


Additional info: The error was happening due to corrupt data in the database, for the workaround, we can use "foreman-rake katello:correct_repositories COMMIT=true"

Comment 2 Justin Sherrill 2021-08-17 23:48:28 UTC
Created redmine issue https://projects.theforeman.org/issues/33278 from this bug

Comment 3 Justin Sherrill 2021-08-17 23:50:22 UTC
2021-08-17T10:04:23 [E|bac|] undefined method `pulp_id' for nil:NilClass (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/app/services/katello/pulp3/migration_plan.rb:68:in `library_migration_for'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/app/services/katello/pulp3/migration_plan.rb:42:in `block in repository_migrations'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/relation/delegation.rb:87:in `each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/app/services/katello/pulp3/migration_plan.rb:41:in `repository_migrations'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/app/services/katello/pulp3/migration_plan.rb:25:in `block in generate_plugins'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/app/services/katello/pulp3/migration_plan.rb:22:in `map'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/app/services/katello/pulp3/migration_plan.rb:22:in `generate_plugins'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/app/services/katello/pulp3/migration_plan.rb:15:in `block in generate'

Comment 4 Bryan Kearney 2021-08-18 00:05:38 UTC
Upstream bug assigned to jsherril

Comment 5 Bryan Kearney 2021-08-18 00:05:41 UTC
Upstream bug assigned to jsherril

Comment 6 Bryan Kearney 2021-08-20 00:05:37 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33278 has been resolved.

Comment 13 errata-xmlrpc 2021-09-21 14:37:27 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.