Bug 2077046
| Summary: | Upgrade fails during db:migrate with PG::ForeignKeyViolation: ERROR: update or delete on table "katello_errata" violates foreign key constraint "katello_content_facet_errata_errata_id" | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Lukas Pramuk <lpramuk> |
| Component: | Errata Management | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED ERRATA | QA Contact: | Lukas Pramuk <lpramuk> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.10.5 | CC: | akjha, sajha, swadeley, vijsingh, zhunting |
| Target Milestone: | 6.10.5 | Keywords: | Triaged, UpgradeBlocker, Upgrades |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 2075519 | Environment: | |
| Last Closed: | 2022-05-04 12:59:16 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2075519 | ||
| Bug Blocks: | |||
|
Comment 3
Lukas Pramuk
2022-04-20 14:39:37 UTC
# foreman-rake db:migrate
'ErbParser' is ignored.
'RubyParser' is ignored.
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
== 20220303160220 RemoveDuplicateErrata: migrating ============================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::ForeignKeyViolation: ERROR: update or delete on table "katello_errata" violates foreign key constraint "katello_erratum_bugzillas_errata_id_fk" on table "katello_erratum_bugzillas"
DETAIL: Key (id)=(11658) is still referenced from table "katello_erratum_bugzillas".
...
>>> so it is the same migration file as in original 6.11.0 BZ
VERIFIED.
@Satellite 6.10.5 Snap2
tfm-rubygem-katello-4.1.1.55-1.el7sat.noarch
by the following manual reproducer:
1) Have QE upgrade template Satellite 6.10 (or fresh 6.10 and sync RHEL repositories)
2) Upgrade to 6.10.5
# satellite-maintain upgrade run --target-version 6.10.z -y
...
--------------------------------------------------------------------------------
Unlock packages: [OK]
--------------------------------------------------------------------------------
Update package(s) : [OK]
--------------------------------------------------------------------------------
Procedures::Installer::Upgrade: [OK]
--------------------------------------------------------------------------------
Execute upgrade:run rake task: [OK]
--------------------------------------------------------------------------------
...
--------------------------------------------------------------------------------
Upgrade finished.
>>> db:migrate finished successfully so the upgrade did
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 (Important: Satellite 6.10.5 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/RHSA-2022:1708 |