Bug 475894 - Oracle uniqueness constraint violation hit when using rhn_push to push packages where both i586 and i686 architectures exist
Summary: Oracle uniqueness constraint violation hit when using rhn_push to push packag...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.4
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Pradeep Kilambi
QA Contact: Steve Salevan
URL:
Whiteboard:
Depends On:
Blocks: space05
TreeView+ depends on / blocked
 
Reported: 2008-12-10 23:00 UTC by Steve Salevan
Modified: 2009-09-17 07:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-17 07:08:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Steve Salevan 2008-12-10 23:00:28 UTC
Description of problem:
If a user attempts to upload both the i586 and i686 versions of the same package, rhn_push returns a funky XMLRPC error that looks like this:

Uploading package /root/f10pkgs/kernel-devel-2.6.27.5-117.fc10.i686.rpm
Using POST request
Internal server error 500 Internal Server Error
Error pushing /root/f10pkgs/kernel-devel-2.6.27.5-117.fc10.i686.rpm: Error 500Error Message:
    ORA-00001: unique constraint (SPACEWALK.RHN_PKG_PROV_CID_PID_S_UQ) violated
Error Class Code: 54
Error Class Info: 
     Package Upload Failed due to uniqueness constraint violation.
     Make sure the package does not have any duplicate dependencies or
     does not already exists on the server (500)

Version-Release number of selected component (if applicable):
Git HEAD

How reproducible:
Always

Steps to Reproduce:
1. Download the Fedora 10 ISO, which has a fair number of packages that have both i586 and i686 versions
2. Setup a new channel on the Spacewalk server and rhn_push packages from the ISO's Packages directory
  
Actual results:
When i586 and i686 versions of the same package uploaded, Oracle emits pandemonium upon your unsuspecting console 

Expected results:
Packages uploaded successfully

Additional info:

Comment 1 Justin Sherrill 2008-12-14 20:26:38 UTC
A user reported this issue (I believe it's the same issue) and it doesn't directly relate to having i586 and i686 packages together.  The reasoning he discovered was that the packages in question have duplicate package provides, which makes a bit more sense.  (I had originally scratched my head when steven asked me about this issue).  I verified that the kernel-devel package that steven mentioned also suffers from duplicate provides.  I'm guessing it is a build problem with fedora doing duplicate provides on i686 and i586 packages?  Here is the users email from spacewalk-list:




I've been working with Spacewalk with a set of channels for Fedora 10. I was attempting to setup a kickstart tree when I ran into the output from the "lint" tool concerning a few packages that weren't present. Upon investigating it looks like I had six packages that weren't added to the base channel I setup. When I attempted to add these packages with rhnpush, I was received the following error for each package.

Error pushing ./kernel-2.6.27.5-117.fc10.i686.rpm: Error 500Error Message:
    ORA-00001: unique constraint (SPACEWALK.RHN_PKG_PROV_CID_PID_S_UQ) violated
Error Class Code: 54
Error Class Info:
     Package Upload Failed due to uniqueness constraint violation.
     Make sure the package does not have any duplicate dependencies or
     does not already exists on the server (500)

After doing some looking around in Oracle and at the packages I concluded that the unique constraint was being violated because the package provides the same capability more than once.

[root@xxxxxx rpms]# rpm -qp --provides kernel-2.6.27.5-117.fc10.i686.rpm
->kernel = 2.6.27.5-117.fc10
kernel-drm = 4.3.0
kernel-drm-nouveau = 11
kernel-i686 = 2.6.27.5-117.fc10
kernel-modeset = 1
kernel-uname-r = 2.6.27.5-117.fc10.i686
linux-gate.so.1
linux-gate.so.1(LINUX_2.5)
->kernel = 2.6.27.5-117.fc10
kernel(x86-32) = 2.6.27.5-117.fc10

I understand that this is an issue with the way the RPM was built, but I can't help wonder if there is a way to handle this situation within Spacewalk aside from failing with an Oracle index constraint violation?

Comment 3 Justin Sherrill 2009-01-09 22:37:51 UTC
pradeep, it would be nice if we could simply ignore those duplicates, right would that be hard to do ?   You can't push F10 otherwise :/

Comment 5 Huzaifa S. Sidhpurwala 2009-01-14 10:52:59 UTC
I have hit this bug too, F9 rpms work, F10 dont

Comment 6 Pradeep Kilambi 2009-02-09 22:20:48 UTC
fixed!

Should be able to push f10 packages successfully.

# rhnpush --server http://hostanme?/APP -u admin -p xxxx -c test-channel ant-1.7.1-7.2.fc10.i386.rpm agrep-0.7.5-5.fc9.i386.rpm amtu-1.0.6-3.fc10.i386.rpm -vvvv 
Connecting to http://hostname/APP
url is http://hostname/PACKAGE-PUSH
Result codes: 200 OK
Computing md5sum and package Info .This may take sometime ...
Uploading package ant-1.7.1-7.2.fc10.i386.rpm
Using POST request
Package agrep-0.7.5-5.fc9.i386.rpm Not Found on RHN Server -- Uploading
Uploading package agrep-0.7.5-5.fc9.i386.rpm
Using POST request
Package amtu-1.0.6-3.fc10.i386.rpm Not Found on RHN Server -- Uploading
Uploading package amtu-1.0.6-3.fc10.i386.rpm
Using POST request
[root@rlx-2-22 ~]#

Comment 7 Jesus M. Rodriguez 2009-04-14 14:12:03 UTC
Spacewalk 0.5 released.

Comment 9 Miroslav Suchý 2009-09-17 07:08:51 UTC
Spacewalk 0.5 has been released for long time ago.


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