Bug 1955397
Summary: | Satellite 6.8 to 6.9 upgrade fails at the db:migrate stage with error "ERROR: insert or update on table "katello_hostgroup_content_facets" violates foreign key constraint" | |||
---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Sayan Das <saydas> | |
Component: | Repositories | Assignee: | Ian Ballou <iballou> | |
Status: | CLOSED ERRATA | QA Contact: | Tasos Papaioannou <tpapaioa> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 6.9.0 | CC: | ahumbe, ajambhul, hyu, iballou, jjeffers, kkohli, mmccune, pcreech, smajumda | |
Target Milestone: | 6.9.3 | Keywords: | PrioBumpField, PrioBumpGSS, Triaged, Upgrades | |
Target Release: | Unused | |||
Hardware: | All | |||
OS: | All | |||
Whiteboard: | ||||
Fixed In Version: | tfm-rubygem-katello-3.18.1.30-1 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1962860 (view as bug list) | Environment: | ||
Last Closed: | 2021-07-01 14:56:48 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: |
Description
Sayan Das
2021-04-30 03:30:49 UTC
Created redmine issue https://projects.theforeman.org/issues/32498 from this bug Upstream bug assigned to iballou Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32498 has been resolved. Verified on 6.9.3 snap 1.0. Steps: 1. On Satellite 6.8.6, create a lifecycle environment, content view, and host group. 2. Update the host group in the database to point to a non-existent content view. *** # su - postgres -c 'psql foreman' foreman=# select id, name, content_view_id, lifecycle_environment_id from hostgroups; id | name | content_view_id | lifecycle_environment_id ----+-----------------+-----------------+-------------------------- 1 | test-host-group | 2 | 2 (1 row) foreman=# select id, name from katello_content_views; id | name ----+--------------------------- 1 | Default Organization View 2 | test-cv (2 rows) foreman=# update hostgroups set content_view_id=3; foreman=# select id, name, content_view_id, lifecycle_environment_id from hostgroups; id | name | content_view_id | lifecycle_environment_id ----+-----------------+-----------------+-------------------------- 1 | test-host-group | 3 | 2 (1 row) 3. Upgrade to 6.9.3: # satellite-maintain upgrade list-versions # satellite-maintain service stop # satellite-maintain upgrade check --target-version 6.9 --whitelist="repositories-validate,repositories-setup" # satellite-maintain upgrade run --target-version 6.9 --whitelist="foreman-fact-names,repositories-validate,repositories-setup" Verify successful upgrade, and warning logged in /var/log/foreman/production.log: 2021-06-07T16:56:53 [W|app|] Unable to save content facet hostgroup for #<Hostgroup id: 1, name: "test-host-group", [...]> due to bad hostgroup data. 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.3 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:2636 |