Bug 1056659 - "ORA-00001: unique constraint (RHNSAT.RHN_SP_SNEP_UQ) violated" after scheduling action for large number of systems
Summary: "ORA-00001: unique constraint (RHNSAT.RHN_SP_SNEP_UQ) violated" after schedul...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space21
TreeView+ depends on / blocked
 
Reported: 2014-01-22 16:30 UTC by Milan Zázrivec
Modified: 2017-07-13 08:19 UTC (History)
7 users (show)

Fixed In Version: spacewalk-backend-2.1.44-1
Doc Type: Bug Fix
Doc Text:
Clone Of: 924179
Environment:
Last Closed: 2014-03-04 13:06:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Milan Zázrivec 2014-01-22 16:30:16 UTC
+++ This bug was initially created as a clone of Bug #924179 +++

Description of problem:

After scheduling package installation or configuration file deployment from Spacewalk webui
for large (60+) number of systems it sends traceback with error

SQL Error generated: (1, 'ORA-00001: unique constraint (RHNSAT.RHN_SP_SNEP_UQ) violated\n', "insert into rhnServerPackage (server_id, name_id, evr_id, package_arch_id, installtime) values (:sysid, LOOKUP_PACKAGE_NAME(:n), LOOKUP_EVR(:e, :v, :r), LOOKUP_PACKAGE_ARCH(:a), TO_DATE(:instime, 'YYYY-MM-DD HH24:MI:SS') )")

If customer schedule same action for less than 40 systems then it works properly without any traceback/error message.

Version-Release number of selected component (if applicable):
Spacewalk 2.0

How reproducible:
Always

Steps to Reproduce:
1. Register around 80-100 systems to Spacewalk
2. Configure osad properly on all systems so that these actions are pulled automatically immediately. 
3. Schedule configuration file deployment or package installation from RHN Satellite webui for all systems from SSM 
  
Actual results:
Scheduled actions are not completed on all systems and Spacewalk sends traceback mail with above error message.

Expected results:
Scheduled action should complete successfully and there should not be any traceback messages generated.

Additional info:

Complete traceback : 

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/server/apacheRequest.py", line 120, in call_function
    response = apply(func, params)
  File "/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 993, in update_packages
    server.save_packages()
  File "/usr/share/rhn/server/rhnServer/server_wrapper.py", line 73, in save_packages
    ret = self.save_packages_byid(self.server["id"], schedule=schedule)
  File "/usr/share/rhn/server/rhnServer/server_packages.py", line 218, in save_packages_byid
    h.execute_bulk(package_data)
  File "/usr/share/rhn/server/rhnSQL/sql_base.py", line 202, in execute_bulk
    ret = ret + apply(self.executemany, (), subdict)
  File "/usr/share/rhn/server/rhnSQL/sql_base.py", line 177, in executemany
    return apply(self._execute_wrapper, (self._executemany, ) + p, kw)
  File "/usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py", line 118, in _execute_wrapper
    raise apply(sql_base.SQLError, ret)
SQLError: (1, 'ORA-00001: unique constraint (RHNSAT.RHN_SP_SNEP_UQ) violated\n', "insert 
into rhnServerPackage (server_id, name_id, evr_id, package_arch_id, installtime) values (:sysid, 
LOOKUP_PACKAGE_NAME(:n), LOOKUP_EVR(:e, :v, :r), LOOKUP_PACKAGE_ARCH(:a), 
TO_DATE(:instime, 'YYYY-MM-DD HH24:MI:SS') )")

Comment 1 Milan Zázrivec 2014-01-23 09:11:16 UTC
spacewalk.git master: d7b30cfcff73dc37537afe94ec824c2463ef8bd6

Comment 2 Matej Kollar 2014-03-04 13:06:50 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21

Comment 3 Matej Kollar 2014-03-04 13:08:38 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21


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