Red Hat Bugzilla – Bug 464700
API Errata addition violates constraint SPACEWALK.RHN_ERRATAFILE_EID_FILE_UQ
Last modified: 2012-03-06 03:43:56 EST
Created attachment 318015 [details]
Perl script to recreate the constraint error.
Description of problem:
If you have multiple archs of an RPM in Spacewalk and try to add an errata through the API for them, you receive a SPACEWALK.RHN_ERRATAFILE_EID_FILE_UQ constraint violation error.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Upload two variations of the same RPM (for my example I was testing kexec-tools-1.102pre-21.el5_2.2.i386.rpm and kexec-tools-1.102pre-21.el5_2.2.x86_64.rpm).
2. Locate the package IDs for these two packages.
3. Use the XMLAPI to upload an errata for these packages (see the attached test script errata_test_case.pl).
"500 Internal Server Error" on command line and "ORA-00001: unique constraint (SPACEWALK.RHN_ERRATAFILE_EID_FILE_UQ) violated" message in catalina.out.
An errata added to the database that refers to both packages.
To verify that the problem is the constraint violation, you can disable the constraint in Oracle (alter table RHNERRATAFILE disable constraint RHN_ERRATAFILE_EID_FILE_UQ;) and re-run the test script.
Created attachment 318017 [details]
The relevant catalina.out for this.
*** This bug has been marked as a duplicate of bug 455034 ***