Bug 2023809
Summary: | Satellite 6.10 upgrade fails with PG::NotNullViolation: ERROR: column "subscription_id" contains null values | |||
---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Stefan Meyer <smeyer> | |
Component: | Subscription Management | Assignee: | satellite6-bugs <satellite6-bugs> | |
Status: | CLOSED ERRATA | QA Contact: | sganar | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 6.10.0 | CC: | dsynk, jbhatia, pcreech, pmendezh, sganar | |
Target Milestone: | 6.11.0 | Keywords: | Triaged, 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: | ||||
: | 2027347 (view as bug list) | Environment: | ||
Last Closed: | 2022-07-05 14:30:00 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
Stefan Meyer
2021-11-16 15:44:00 UTC
Created redmine issue https://projects.theforeman.org/issues/33936 from this bug A workaround for this bug is to run the following on the server:
>> foreman-rake console
>> ::Katello::Pool.where(subscription_id: nil).destroy_all
Then run the installer again - it should succeed.
Upstream bug assigned to jturel Upstream bug assigned to jturel Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33936 has been resolved. Verified in Satellite 6.11 Snap 18 Steps: Started with a Satellite 6.10.5 To recreate the initial conditions, we need to null out the subscription_id from at least one subscription. Become the postgres user and enter the foreman db [root@dhcp-2-142 ~]# su - postgres -bash-4.2$ psql foreman psql (12.9) Alter the table rules to enable us setting the subscription_id to NULL foreman=# ALTER TABLE katello_pools ALTER COLUMN subscription_id DROP NOT NULL; foreman=# update katello_pools set subscription_id=NULL where id=2; foreman=# update katello_pools set subscription_id=NULL where id=4; Verify that the id's are indeed null foreman=# select id,subscription_id from katello_pools where subscription_id IS null; id | subscription_id ----+----------------- 2 | 4 | (2 rows) <perform upgrade> Verify that there are no longer any subscriptions with NULL subscription_ids [root@dhcp-2-142 ~]# su - postgres -bash-4.2$ psql foreman psql (12.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 (Moderate: Satellite 6.11 Release), 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:5498 |