Bug 970804 - ORA-02291: integrity constraint (SPACEWALK.RHN_PACKAGESYNCBL_PNID_FK) violated - parent key
ORA-02291: integrity constraint (SPACEWALK.RHN_PACKAGESYNCBL_PNID_FK) violate...
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Installation (Show other bugs)
1.9
x86_64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Jan Pazdziora
Red Hat Satellite QA List
:
Depends On:
Blocks: space20
  Show dependency treegraph
 
Reported: 2013-06-04 19:28 EDT by ajohnson
Modified: 2017-07-13 04:19 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-02 09:13:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
populate.db.log (109.25 KB, text/plain)
2013-06-04 19:28 EDT, ajohnson
no flags Details

  None (edit)
Description ajohnson 2013-06-04 19:28:27 EDT
Created attachment 757011 [details]
populate.db.log

Description of problem:

Oracle database 
spacewalk-setup --disconnected --external-db 

the Spacewalk installation fails with the following error in /var/log/rhn/populate_db.log

ORA-02291: integrity constraint (SPACEWALK.RHN_PACKAGESYNCBL_PNID_FK) violated - parent key



Version-Release number of selected component (if applicable):
Spacewalk 1.9 

How reproducible:
Yes every time clean database 

Steps to Reproduce:
1. spacewalk-setup --disconnected --external-db
2.
3.

Actual results:

ORA-02291: integrity constraint (SPACEWALK.RHN_PACKAGESYNCBL_PNID_FK) violated - parent key

Expected results:
spacewalk would build all tables without error out. 




Additional info:

Here is the problem that oracle found.

diff -u /etc/sysconfig/rhn/oracle/main.sql-20110504 /etc/sysconfig/rhn/oracle/main.sql
--- main.sql-20110504	2011-04-08 21:40:53.000000000 +0200
+++ main.sql	2011-05-04 14:20:24.000000000 +0200
@@ -38940,6 +38940,12 @@
 
 
 -- Source: data/common/rhnPackageSyncBlacklist.sql
+
+select lookup_package_name('gpg-pubkey') from dual;
+
+select lookup_package_name('rhns-ca-cert') from dual;
+
+select lookup_package_name('rhn-org-trusted-ssl-cert') from dual;
     
 insert into rhnPackageSyncBlacklist (package_name_id)
 	values (lookup_package_name('gpg-pubkey'));
Comment 1 Jan Pazdziora 2013-06-05 02:19:36 EDT
(In reply to ajohnson from comment #0)
> 
> Additional info:
> 
> Here is the problem that oracle found.
> 
> diff -u /etc/sysconfig/rhn/oracle/main.sql-20110504
> /etc/sysconfig/rhn/oracle/main.sql
> --- main.sql-20110504	2011-04-08 21:40:53.000000000 +0200
> +++ main.sql	2011-05-04 14:20:24.000000000 +0200
> @@ -38940,6 +38940,12 @@
>  
>  
>  -- Source: data/common/rhnPackageSyncBlacklist.sql
> +
> +select lookup_package_name('gpg-pubkey') from dual;
> +
> +select lookup_package_name('rhns-ca-cert') from dual;
> +
> +select lookup_package_name('rhn-org-trusted-ssl-cert') from dual;
>      
>  insert into rhnPackageSyncBlacklist (package_name_id)
>  	values (lookup_package_name('gpg-pubkey'));

This patch is incomplete and incorrect.
Comment 2 Jan Pazdziora 2013-06-05 02:39:28 EDT
Please see bug 965305 comment 8.
Comment 3 Jan Pazdziora 2013-06-05 02:41:16 EDT
Addressed in Spacewalk master, d2e4546fe40ca153ae7711366c21b6cf9d84ef1a and 66f17625b25ff470743ac4b197c6a47ba18f392b.
Comment 4 Tomáš Kašpárek 2013-08-02 09:13:16 EDT
Fix for this bug is present in Spacewalk 2.0, closing this bug as CURRENTRELEASE.

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