Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionJaroslav Krajicek
2021-12-09 14:53:43 UTC
Description of problem:
Upgrade to Satellite 6.10 fails on katello:pulp3_content_switchover, blocking further steps.
~~~
Failed executing foreman-rake katello:pulp3_content_switchover, exit status 1:
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
rake aborted!
ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_katello_rpms_on_pulp_id"
DETAIL: Key (pulp_id)=(/pulp/api/v3/content/rpm/packages/979d5477-4c2e-4994-9367-9ef5d3387258/) already exists.
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `async_exec_params'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `block (2 levels) in exec_no_cache'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.4/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.4/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.4/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql_adapter.rb:674:in `block in exec_no_cache'
~~~
How reproducible:
Reverting and re-run results in the same
Additional info:
Attached trace output
Attached another customer case to this, errors seem to fit the pattern:
~~~
Several variant IDs of this:
374:2021-12-10 13:07:56 EST ERROR: duplicate key value violates unique constraint "core_artifact_sha256_key"
375-2021-12-10 13:07:56 EST DETAIL: Key (sha256)=(d0cbb960d9e7579b29c3a946c344b7efa4f4bab6e357f9f2c1a9ced8ce0ff518) already exists.
--
A couple copies of these, one for each content-switchover attempt after the issue:
377:2021-12-10 13:25:41 EST ERROR: duplicate key value violates unique constraint "index_katello_rpms_on_pulp_id"
378-2021-12-10 13:25:41 EST DETAIL: Key (pulp_id)=(/pulp/api/v3/content/rpm/packages/6f0e4a46-3556-4c26-96cb-1fad61475c0d/) already exists.
~~~
No errors observed in Migration tasks. Initial upgrade attempt failed due to yum dependency issue, not related to migrating content. Confirmed that in between the pre-migration tasks and the resolution of the dependency issue (thus another run of the content-switchover) two repos were synced. Unable to confirm exactly these things as we don't have the DB, but the case seems to fit scenario in comment 8 exactly.
Plan of action:
1) create a rake task that will attempt to cleanup data from pulp2's usage after switchover
2) Add checks on 6.9.z at sync time, cv publish/promote, package upload to stop any actions if switchover has been performed
3) update foreman-maintain/satellite-maintain to warn users that once switchover completes, they cannot go back to 6.9
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.8 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-2022:0320