Bug 1174777 - when you sync your 5.6.0 from dump created on 5.7.0 and later decide to upgrade to 5.7.0, spacewalk-schema-upgrade fails
Summary: when you sync your 5.6.0 from dump created on 5.7.0 and later decide to upgra...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades
Version: 570
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks: sat570-upgrades
TreeView+ depends on / blocked
 
Reported: 2014-12-16 13:06 UTC by Jan Hutař
Modified: 2019-05-20 11:23 UTC (History)
3 users (show)

Fixed In Version: spacewalk-schema-2.3.2-15-sat
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-13 10:25:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2014-12-16 13:06:47 UTC
Description of problem:
When you sync your Satellite 5.6.0 from dump created on 5.7.0 and later decide to upgrade to 5.7.0, spacewalk-schema-upgrade fails


Version-Release number of selected component (if applicable):
rhn-upgrade-5.7.0.16-1.el6sat.noarch
5.6.0 with managed PostgreSQL upgraded to Satellite-5.7.0-RHEL6-re20141212.0-x86_64


How reproducible:
1 of 1


Steps to Reproduce:
1. Install 5.6.0
2. # satellite-sync -m /tmp/dump_from_5_7_0 -c rhel-x86_64-server-7 \
     -c rhn-tools-rhel-x86_64-server-7
3. Upgrade packages and then follow satellite-upgrade-postgresql.txt
   "2. Upgrade the database schema."


Actual results:
# /usr/bin/spacewalk-schema-upgrade
Schema upgrade: [satellite-schema-5.6.0.19-3.el6sat] -> [satellite-schema-5.7.0.11-1.el6sat]
Searching for upgrade path: [satellite-schema-5.6.0.19-3] -> [satellite-schema-5.7.0.11-1]
Searching for upgrade path: [satellite-schema-5.6.0.19] -> [satellite-schema-5.7.0.11]
Searching for upgrade path: [satellite-schema-5.6.0] -> [satellite-schema-5.7.0]
Searching for upgrade path: [satellite-schema-5.6] -> [satellite-schema-5.7]
The path: [satellite-schema-5.6] -> [satellite-schema-5.7]
Planning to run spacewalk-sql with [/var/log/spacewalk/schema-upgrade/20141216-075001-script.sql]

Plase make sure you have a valid backup of your database before continuing.

Hit Enter to continue or Ctrl+C to interrupt: 
Executing spacewalk-sql, the log is in [/var/log/spacewalk/schema-upgrade/20141216-075001-to-satellite-schema-5.7.log].
Upgrade failed, please see log [/var/log/spacewalk/schema-upgrade/20141216-075001-to-satellite-schema-5.7.log].
# tail /var/log/spacewalk/schema-upgrade/20141216-075001-to-satellite-schema-5.7.log

UPDATE 0
COMMIT
                                ?column?                                 
-------------------------------------------------------------------------
 satellite-schema-5.6-to-satellite-schema-5.7/036-armv6hl.sql.postgresql
(1 row)

psql:/var/log/spacewalk/schema-upgrade/20141216-075001-script.sql:3243: ERROR:  duplicate key value violates unique constraint "rhn_cpuarch_label_uq"
DETAIL:  Key (label)=(armv6hl) already exists.


Expected results:
Should work

Comment 13 Lukas Pramuk 2015-01-08 10:28:47 UTC
VERIFIED. spacewalk-schema-2.3.2-14-sat fixed
ERROR:  duplicate key value violates unique constraint "rhn_carch_label_uq"

Comment 14 Lukas Pramuk 2015-01-08 10:33:21 UTC
Yet another failure related to the changes introduced with new archs is in place:

015-rhnServerServerGroupArchCompat-missing-virt-platform-mappings.sql.postgresql: 

ERROR:  duplicate key value violates unique constraint "rhn_ssg_ac_said_sgt_uq"
DETAIL:  Key (server_arch_id, server_group_type)=(1030, 7) already exists.

Comment 16 Lukas Pramuk 2015-01-08 12:56:32 UTC
VERIFIED. 
spacewalk-schema-2.3.2-15.el6sat.noarch fixed  
ERROR:  duplicate key value violates unique constraint "rhn_ssg_ac_said_sgt_uq"

Comment 17 Clifford Perry 2015-01-13 10:25:50 UTC
With the release of Red Hat Satellite 5.7 on January 12th 2015 this bug is
being moved to a Closed Current Release state. 

The Satellite 5.7 GA Errata:
 - https://rhn.redhat.com/errata/RHSA-2015-0033.html 

Satellite 5.7 Release Notes:
 -
https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Release_Notes/index.html

Satellite Customer Portal Blog announcement for release:
 - https://access.redhat.com/blogs/1169563/posts/1315743 

Cliff

NOTE: This bug has not been re-verified (moved to RELEASE_PENDING) prior to release. We assume that the bug has indeed been fixed and not regressed since we initially verified it. Please re-open in the future if needed.


Note You need to log in before you can comment on or make changes to this bug.