Red Hat Bugzilla – Bug 843367
ISE when rhnpushing multiple packages
Last modified: 2013-08-02 09:16:08 EDT
Created attachment 600444 [details]
Description of problem:
I was rhnpushing multiple packages from Fedora17 install DVD and I was getting random ISE.
Version-Release number of selected component (if applicable):
Spacewalk 1.8 (nightly)
these ISE seemed random for me, I got 2 in 5 minutes and then for 2 hours nothing
Steps to Reproduce:
1. rhnpush contents of any (i recommend fedora17) installation DVD to a custom channel
ISE message when pushing packages with rhnpush
Even if I get ISE when pushing a package I can still see it in Spacewalk web UI in package listing for my custom channel
SQLError: (1, 'ORA-00001: unique constraint (SPACEUSER.RHN_SRPM_NAME_UQ) violated\n', 'insert into rhnSourceRPM (id, name) values (:id, :value)')
so you were pushing source RPMs, weren't you?
I was pushing only contents of Fedora17 installation DVD, and as far as i know there are no sRPMs present
tried ls -R | grep src in Packages folder and no results ...
The rhnSourceRPM table only holds a id => name lookup and is referenced for example by rhnPackage.source_rpm_id.
(In reply to comment #0)
> Created attachment 600444 [details]
> Traceback email
> Description of problem:
> I was rhnpushing multiple packages from Fedora17 install DVD and I was
> getting random ISE.
> Version-Release number of selected component (if applicable):
> Spacewalk 1.8 (nightly)
> How reproducible:
> these ISE seemed random for me, I got 2 in 5 minutes and then for 2 hours
> Steps to Reproduce:
> 1. rhnpush contents of any (i recommend fedora17) installation DVD to a
> custom channel
Were you by any chance running some other pushing or syncing process in parallel? Possibly of completely different channel / yum repository?
Checking the backend code, the logic there is pretty straightforward -- for keys of hash, select from the table where name = ?, if we don't get the id, get the id from sequence and run insert for the new id and the name pair.
Traceback says you are trying to insert duplicated values. The backend logic is: select ids and if they aren't there, insert them. We are not limiting count of rhnpush/sync instances running at once, so if first rhnpush does select and second rhnpush does select before first does insert, this happens. This can be maybe improved by adding some synchronization mechanisms. But actually it isn't bug because packages are successfully pushed when rhnpush automatically tries it again.
improved in spacewalk git master: eb0eba65a0672a1a36714fe8f494d45731345723
Fix for this bug is present in Spacewalk 2.0, closing this bug as CURRENTRELEASE.