Bug 475894 - Oracle uniqueness constraint violation hit when using rhn_push to push packages where both i586 and i686 architectures exist
Oracle uniqueness constraint violation hit when using rhn_push to push packag...
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
0.4
All Linux
high Severity high
: ---
: ---
Assigned To: Pradeep Kilambi
Steve Salevan
:
Depends On:
Blocks: space05
  Show dependency treegraph
 
Reported: 2008-12-10 18:00 EST by Steve Salevan
Modified: 2009-09-17 03:08 EDT (History)
4 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Steve Salevan 2008-12-10 18:00:28 EST
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 15:26:38 EST
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 17:37:51 EST
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 05:52:59 EST
I have hit this bug too, F9 rpms work, F10 dont
Comment 6 Pradeep Kilambi 2009-02-09 17:20:48 EST
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 10:12:03 EDT
Spacewalk 0.5 released.
Comment 9 Miroslav Suchý 2009-09-17 03:08:51 EDT
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.