Bug 843367 - ISE when rhnpushing multiple packages
ISE when rhnpushing multiple packages
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
1.8
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Dobes
Red Hat Satellite QA List
:
Depends On:
Blocks: space20
  Show dependency treegraph
 
Reported: 2012-07-26 03:03 EDT by Tomáš Kašpárek
Modified: 2013-08-02 09:16 EDT (History)
3 users (show)

See Also:
Fixed In Version: spacewalk-schema-1.10.33, spacewalk-backend-1.10.30
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-02 09:16:08 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)
Traceback email (17.77 KB, text/plain)
2012-07-26 03:03 EDT, Tomáš Kašpárek
no flags Details

  None (edit)
Description Tomáš Kašpárek 2012-07-26 03:03:25 EDT
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 nothing

Steps to Reproduce:
1. rhnpush contents of any (i recommend fedora17) installation DVD to a custom channel

  
Actual results:
ISE message when pushing packages with rhnpush


Expected results:
No errors


Additional info:
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
Comment 1 Michael Mráka 2012-08-10 04:48:36 EDT
Traceback says
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?
Comment 2 Tomáš Kašpárek 2012-08-10 04:55:49 EDT
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 ...
Comment 3 Jan Pazdziora 2013-03-08 09:52:44 EST
The rhnSourceRPM table only holds a id => name lookup and is referenced for example by rhnPackage.source_rpm_id.
Comment 4 Jan Pazdziora 2013-03-08 10:03:57 EST
(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
> nothing
> 
> 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.
Comment 5 Jan Dobes 2013-05-06 10:38:58 EDT
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.
Comment 6 Jan Dobes 2013-05-13 11:39:05 EDT
improved in spacewalk git master: eb0eba65a0672a1a36714fe8f494d45731345723
Comment 7 Tomáš Kašpárek 2013-08-02 09:16:08 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.