Pulp2 to Pulp3 content migration fails with error "NoMethodError: undefined method `repository_errata' for nil:NilClass"

Solution Verified - Updated -

Issue

  • The satellite-maintain content prepare command fails with the following error:

    2022-10-20 10:20:22 +0000: Importing migrated content type erratum: 773000/771271Migration failed, You will want to investigate: https://satellite.example.com/foreman_tasks/tasks/0b1cd29e-2320-4d79-9d0b-d90da99f17c7
    rake aborted!
    ForemanTasks::TaskError: Task 0b1cd29e-2320-4d79-9d0b-d90da99f17c7: NoMethodError: undefined method `repository_errata' for nil:NilClass
    /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.55/lib/katello/tasks/pulp3_migration.rake:43:in `block (2 levels) in <top (required)>'
    /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
    Tasks: TOP => katello:pulp3_migration
    (See full trace by running task with --trace)
                                                                         [FAIL]
    Failed executing preserve_output=true foreman-rake katello:pulp3_migration, exit status 1
    
  • The satellite-maintain content migration-stats command displays few missing or unmigrated Contents as shown below:

    ================================================================================
    Retrieve Pulp 2 to Pulp 3 migration statistics:
    ============Migration Summary================
    Migrated/Total RPMs: 247864/248794
    Migrated/Total errata: 1263335/1283802
    Migrated/Total repositories: 1185/1193
    

Environment

  • Red Hat Satellite 6.9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content