Project

General

Profile

Actions

Bug #34483

closed

The pulp2-pulp3 migration should fail if not all the errata content has been migrated

Added by Ian Ballou about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2043933

Description of problem:

Whether manual attempt or via foreman-maintain itself, The "Performing final content migration before switching content" step always succeeds even if some errata content is not migrated and then when "katello:pulp3_content_switchover" happens, It will encounter https://bugzilla.redhat.com/show_bug.cgi?id=2038241 .

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

Katello 3.18

How reproducible:

Always with unmigrated errata

Steps to Reproduce:

1) Run the migration with some yum repositories.
2) Edit the repository errata to have nil erratum_pulp3_hrefs
3) Run the migration again and the switchover

Actual results:

The output of step 2:

  1. foreman-maintain content migration-stats
    Running Retrieve Pulp 2 to Pulp 3 migration statistics ================================================================================
    Retrieve Pulp 2 to Pulp 3 migration statistics:
    ============Migration Summary================
    Migrated/Total RPMs: 132353/132353
    Migrated/Total errata: 194411/194944
    Migrated/Total repositories: 288/288
    Estimated migration time based on yum content: 5 hours, 15 minutes

Note: ensure there is sufficient storage space for /var/lib/pulp/published to double in size before starting the migration process.
Check the size of /var/lib/pulp/published with 'du -sh /var/lib/pulp/published/'

Note: ensure there is sufficient storage space for postgresql.
You will need additional space for your postgresql database. The partition holding '/var/opt/rh/rh-postgresql12/lib/pgsql/data/'
will need additional free space equivalent to the size of your Mongo db database (/var/lib/mongodb/).
[OK]
--------------------------------------------------------------------------------

--> 533 ERRATA not migrated but still, the command does not complain about it.

Failure at Step 3:

Switching specified content over to pulp 3 [FAIL]
Failed executing foreman-rake katello:pulp3_content_switchover, exit status 1:
ERROR: at least one Erratum record has migrated_pulp3_href NULL value

Expected results:

The "foreman-maintain content prepare" or the underlying rake i.e. "foreman-rake katello:pulp3_migration" should fail if not all the ERRATA contents are migrated and should not proceed further with content-switchover phase.

The way this migration process reports about MISSING\CORRUPTED content, The rake\command should also report for UNMIGRATED ERRATA as well.

Additional info:

Even better if we get one of these outputs grabbed somewhere.

  1. echo "select katello_repositories.id, katello_repositories.relative_path,count(*) from katello_repository_errata \

left join katello_repositories on katello_repositories.id = katello_repository_errata.repository_id \
where erratum_pulp3_href is null group by katello_repositories.id;" | su - postgres -c "psql foreman"

id | relative_path | count
----+-------------------------------------------------------------------------------------------------+-------
40 | PFG_Pilot/Pilot_Wave/Midrange_RHEL_7_x86_64/content/dist/rhel/server/7/7Server/x86_64/extras/os | 533
(1 row)
  1. echo "Katello::RepositoryErratum.where(erratum_pulp3_href: nil).pluck(:repository_id).uniq" | foreman-rake console

[40]

Actions #1

Updated by Ian Ballou about 2 years ago

  • Subject changed from The pulp2-pulp3 migration should fail if not all the errata content has been migrated to The pulp2-pulp3 migration should fail if not all the errata content has been migrated
  • Target version changed from Katello 4.4.0 to 3.18-no-release-planned
Actions #2

Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ian Ballou
  • Pull request https://github.com/Katello/katello/pull/9963 added
Actions #3

Updated by Ian Ballou about 2 years ago

  • Category deleted (Repositories)
  • Status changed from Ready For Testing to Closed
  • Assignee deleted (Ian Ballou)
  • Target version deleted (3.18-no-release-planned)
Actions #4

Updated by Chris Roberts about 2 years ago

  • Target version set to 3.18-no-release-planned
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF