Bug 1402437 - solaris channel blocks upgrade to 5.8
Summary: solaris channel blocks upgrade to 5.8
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Ales Dujicek
URL:
Whiteboard:
Depends On:
Blocks: sat580-upgrades
TreeView+ depends on / blocked
 
Reported: 2016-12-07 14:49 UTC by Ales Dujicek
Modified: 2017-06-21 12:08 UTC (History)
2 users (show)

Fixed In Version: spacewalk-schema-2.5.1-27-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-21 12:08:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ales Dujicek 2016-12-07 14:49:38 UTC
Description of problem:

5.7 to 5.8 upgrade failed

'SATELLITE-SCHEMA-5.7-TO-SATELLITE-SCHEMA-5.8/007-REMOVE-SOLARIS-ARCH.SQL.ORACL
-------------------------------------------------------------------------------
satellite-schema-5.7-to-satellite-schema-5.8/007-remove-solaris-arch.sql.oracle


3 rows deleted.


3 rows deleted.


1 row deleted.


1 row deleted.


6 rows deleted.


8 rows deleted.


1 row deleted.


3 rows deleted.

delete from rhnChannelArch where label = 'channel-sparc-sun-solaris'
*
ERROR at line 1:
ORA-02292: integrity constraint (RHNSAT.RHN_CHANNEL_CAID_FK) violated - child record found


I created some solaris channels in 5.7 before upgrade:

channel_id,channel_label,channel_name,number_of_packages,org_id
180,solaris-channel,solaris-channel,0,1
181,solaris-channel-i386,solaris-channel-i386,8,1
182,solaris-channel-sparc,solaris-channel-sparc,8,1



Version-Release number of selected component (if applicable):
satellite-schema-5.8.0.15-1.el6sat.noarch

Steps to Reproduce:
1. create solaris channel in 5.7
2. upgrade to 5.8

Comment 1 Lukáš Hellebrandt 2016-12-13 09:39:19 UTC
Another related error:

***
 satellite-schema-5.7-to-satellite-schema-5.8/007-remove-solaris-arch.sql.postgresql
(1 row)

DELETE 3
[...]
DELETE 4
psql:/var/log/spacewalk/schema-upgrade/20161212-111412-script.sql:14794: ERROR:  update or delete on table "rhnpackagearch" violates foreign key constraint "rhn_pkgnevra_paid_fk" on table "rhnpackagenevra"
DETAIL:  Key (id)=(122) is still referenced from table "rhnpackagenevra".
***

Comment 2 Tomáš Kašpárek 2016-12-13 10:42:01 UTC
spacewalk.git(master): 0de4aaa9627ba84bb0ef6ed696303dbd74e65d72

Comment 4 Tomas Lestach 2016-12-13 12:32:04 UTC
Looks like the correct commit in Comment 2 should be ...

spacewalk.git: 13139936e3033b642122a700514eaf311ae8a6d6

Comment 6 Ales Dujicek 2016-12-19 15:28:41 UTC
Related issue on Oracle:


'SATELLITE-SCHEMA-5.7-TO-SATELLITE-SCHEMA-5.8/007-REMOVE-SOLARIS-ARCH.SQL.ORACL
-------------------------------------------------------------------------------
satellite-schema-5.7-to-satellite-schema-5.8/007-remove-solaris-arch.sql.oracle


Procedure created.

No errors.

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


Procedure dropped.


Procedure created.

No errors.
BEGIN delete_channel_tmp('channel-sparc-sun-solaris'); END;

*
ERROR at line 1:
ORA-02292: integrity constraint (RHNSAT.RHN_CHANNEL_PARENT_CH_FK) violated - child record found
ORA-06512: at "RHNSAT.DELETE_CHANNEL", line 15
ORA-06512: at "RHNSAT.DELETE_CHANNEL_TMP", line 10
ORA-06512: at line 1

Comment 7 Tomáš Kašpárek 2016-12-20 09:16:13 UTC
spacewalk.git(master): 50e953c2735bb099e168be695b9fa580235e3866

Comment 8 Tomáš Kašpárek 2016-12-20 09:27:29 UTC
fixed sha1
spacewalk.git(master): 91d5fa0d01dbb2ed6290eb3caa725c3ee7cab6ef


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