Bug 832299 - Exception while handling function registration.update_packages during - solaris client
Exception while handling function registration.update_packages during - sola...
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
1.7
sparc Solaris
unspecified Severity medium
: ---
: ---
Assigned To: Jan Pazdziora
Red Hat Satellite QA List
:
Depends On:
Blocks: space18
  Show dependency treegraph
 
Reported: 2012-06-15 01:39 EDT by paul.wickham
Modified: 2012-11-01 12:21 EDT (History)
1 user (show)

See Also:
Fixed In Version: spacewalk-backend-1.8.4-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-01 12:21:27 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)

  None (edit)
Description paul.wickham 2012-06-15 01:39:25 EDT
Since upgrading to spacewalk 1.7 and migrating to postgresql we keep receiving the following error:
Exception reported from <CENSORED!>
Time: Fri Jun 15 13:21:22 2012
Exception type psycopg2.IntegrityError
Exception while handling function registration.update_packages Request object information:
URI: /XMLRPC
Remote Host: <CENSORED!>
Server Name: <CENSORED!>
Headers passed in:
	Accept-Encoding: identity
	Content-Length: 593256
	Host: <CENSORED!>
	content-type: text/xml
	user-agent: rhn.rpclib.py/$Revision: 1.40 $
	x-client-version: 1
	x-info: RPC Processor (C) Red Hat, Inc (version 1.46)
	x-rhn-client-capability: reboot.reboot(1)=1,configfiles.deploy(1)=1,caneatCheese(1)=1,packages.rollBack(1)=1,configfiles.mtime_upload(1)=1,configfiles.diff(1)=1,script.run(1)=1,configfiles.upload(1)=1,packages.runTransaction(1)=1
	x-rhn-transport-capability: follow-redirects=1
	x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc (version 1.40)
	x-up2date-version: @VERSION@

Exception Handler Information
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/<CENSORED!>/server/apacheRequest.py", line 122, in call_function
    response = apply(func, params)
  File "/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 923, in update_packages
    server.add_package(package)
  File "/usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnServer/server_wrapper.py", line 62, in add_package
    SolarisPatches.add_patch(self, self.server.get("id"), entry)
  File "/usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnServer/server_solarispatches.py", line 89, in add_patch
    self._patches[sysid].append(DBPatch(patch))
  File "/usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnServer/server_solarispatches.py", line 55, in __init__
    self.id = get_package_id(patch)
  File "/usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnServer/server_solarispatches.py", line 39, in get_package_id
    handle.execute(name=p.n, epoch=p.e, ver=p.v, rel=p.r, arch=p.a)
  File "/usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnSQL/sql_base.py", line 163, in execute
    return apply(self._execute_wrapper, (self._execute, ) + p, kw)
  File "/usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnSQL/driver_postgresql.py", line 282, in _execute_wrapper
    retval = apply(function, p, kw)
  File "/usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnSQL/sql_base.py", line 217, in _execute
    return self._execute_(args, kwargs)
  File "/usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnSQL/driver_postgresql.py", line 295, in _execute_
    self._real_cursor.execute(self.sql, params)
IntegrityError: new row for relation "rhnpackageevr" violates check constraint "vn_rhnpackageevr_epoch"
CONTEXT:  Error occurred on dblink connection named "unnamed": could not execute command.
SQL statement "SELECT  dblink_exec('at_conn',  $1 , true)"
PL/pgSQL function "pg_dblink_exec" line 4 at PERFORM SQL statement "SELECT  pg_dblink_exec( 'insert into rhnPackageEVR(id, epoch, version, release, evr) values (' ||  $1  || ', ' || coalesce(quote_literal( $2 ), 'NULL') || ', ' || coalesce(quote_literal( $3 ), 'NULL') || ', ' || coalesce(quote_literal( $4 ), 'NULL') || ', ' || evr_t(coalesce(quote_literal( $2 ), 'NULL'), coalesce(quote_literal( $3 ), 'NULL'), coalesce(quote_literal( $4 ), 'NULL')) || ')' )"
PL/pgSQL function "lookup_evr" line 14 at PERFORM


Local variables by frame
Frame _execute_ in /usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnSQL/driver_postgresql.py at line 295
	                self = <type 'instance'> <<CENSORED!>.server.rhnSQL.driver_postgresql.Cursor instance at 0x2b9bf47bf560>
	                args = <type 'tuple'> ()
	              params = <type 'instance'> {'ver': '15', 'epoch': '', 'arch': 'sparc-solaris-patch', 'name': 'patch-solaris-125095', 'rel': '1'}
	              kwargs = <type 'dict'> {'arch': 'sparc-solaris-patch', 'epoch': '', 'ver': '15', 'name': 'patch-solaris-125095', 'rel': '1'}

Frame _execute in /usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnSQL/sql_base.py at line 217
	                self = <type 'instance'> <<CENSORED!>.server.rhnSQL.driver_postgresql.Cursor instance at 0x2b9bf47bf560>
	                args = <type 'tuple'> ()
	                 val = <type 'str'> sparc-solaris-patch
	              kwargs = <type 'dict'> {'arch': 'sparc-solaris-patch', 'epoch': '', 'ver': '15', 'name': 'patch-solaris-125095', 'rel': '1'}

Frame _execute_wrapper in /usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnSQL/driver_postgresql.py at line 287
	            function = <type 'instancemethod'> <bound method Cursor._execute of <<CENSORED!>.server.rhnSQL.driver_postgresql.Cursor instance at 0x2b9bf47bf560>>
	                self = <type 'instance'> <<CENSORED!>.server.rhnSQL.driver_postgresql.Cursor instance at 0x2b9bf47bf560>
	               value = <type 'str'> 1
	                   p = <type 'tuple'> ()
	                  kw = <type 'dict'> {'ver': '15', 'epoch': '', 'arch': 'sparc-solaris-patch', 'name': 'patch-solaris-125095', 'rel': '1'}
	                 key = <type 'str'> rel
	              params = <type 'str'> ver: 15,epoch: ,arch: sparc-solaris-patch,name: patch-solaris-125095,rel: 1

Frame execute in /usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnSQL/sql_base.py at line 163
	                   p = <type 'tuple'> ()
	                self = <type 'instance'> <<CENSORED!>.server.rhnSQL.driver_postgresql.Cursor instance at 0x2b9bf47bf560>
	                  kw = <type 'dict'> {'arch': 'sparc-solaris-patch', 'epoch': '', 'ver': '15', 'name': 'patch-solaris-125095', 'rel': '1'}

Frame get_package_id in /usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnServer/server_solarispatches.py at line 39
	               query = <type 'str'> SELECT id FROM rhnPackage
               WHERE name_id=LOOKUP_PACKAGE_NAME(:name)
               AND evr_id=LOOKUP_EVR(:epoch, :ver, :rel)
               AND package_arch_id=LOOKUP_PACKAGE_ARCH(:arch)
	              handle = <type 'instance'> <<CENSORED!>.server.rhnSQL.driver_postgresql.Cursor instance at 0x2b9bf47bf560>
	                 pkg = <type 'dict'> {'release': '1', 'epoch': '', 'version': '15', 'arch': 'sparc-solaris-patch', 'name': 'patch-solaris-125095'}
	                   p = <type 'instance'> server.rhnServer.dbPackage instance {'a': 'sparc-solaris-patch', 'real': 0, 'package_arch_id': None, 'e': '', 'installtime': None, 'n': 'patch-solaris-125095', 'status': 1, 'r': '1', 'name_id': None, 'v': '15', 'evr_id': None}

Frame __init__ in /usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnServer/server_solarispatches.py at line 55
	                self = <class '<CENSORED!>.server.rhnServer.server_solarispatches.DBPatch'> <<CENSORED!>.server.rhnServer.server_solarispatches.DBPatch object at 0x2b9bf47be410>
	               patch = <type 'dict'> {'release': '1', 'epoch': '', 'version': '15', 'arch': 'sparc-solaris-patch', 'name': 'patch-solaris-125095'}

Frame add_patch in /usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnServer/server_solarispatches.py at line 89
	               sysid = <type 'int'> 1000010564
	                self = <class '<CENSORED!>.server.rhnServer.server_class.Server'> <Server Class at 47948821685648: {'self.cert': None, 'self.server': {'info': (None, 0), 'creator_id': (32, 0), 'provision_state_id': (None, 0), 'name': ('syd08uatux01', 0), 'created': (datetime.datetime(2012, 6, 6, 12, 14, 43, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2b9bf47be550>), 0), 'auto_update': ('N', 0), 'running_kernel': ('5.10', 0), 'description': ('Initial Registration Parameters:\nOS: SunOS\nRelease: 5.10\nCPU Arch: sparc-sun4u-solaris', 0), 'org_id': (1, 0), 'modified': (datetime.datetime(2012, 6, 6, 12, 17, 53, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2b9bf47be510>), 0), 'server_arch_id': (1027, 0), 'secret': ('aab50f2678ac92a12c2732ccfd00da8a', 0), 'last_boot': (0, 0), 'digital_server_id': ('ID-1000010564', 0), 'release': ('5.10', 0), 'channels_changed': (datetime.datetime(2012, 6, 6, 12, 17, 53, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2b9bf47be2d  0>), 0), 'auto_deliver': ('N', 0), 'os': ('SunOS', 0), 'id': (1000010564, 0), 'cobbler_id': (None, 0)}}>

	               patch = <type 'dict'> {'release': '1', 'epoch': '', 'version': '15', 'arch': 'sparc-solaris-patch', 'name': 'patch-solaris-125095'}

Frame add_package in /usr/lib/python2.4/site-packages/<CENSORED!>/server/rhnServer/server_wrapper.py at line 62
	               entry = <type 'dict'> {'release': '1', 'epoch': '', 'version': '15', 'arch': 'sparc-solaris-patch', 'name': 'patch-solaris-125095'}
	                self = <class '<CENSORED!>.server.rhnServer.server_class.Server'> <Server Class at 47948821685648: {'self.cert': None, 'self.server': {'info': (None, 0), 'creator_id': (32, 0), 'provision_state_id': (None, 0), 'name': ('syd08uatux01', 0), 'created': (datetime.datetime(2012, 6, 6, 12, 14, 43, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2b9bf47be550>), 0), 'auto_update': ('N', 0), 'running_kernel': ('5.10', 0), 'description': ('Initial Registration Parameters:\nOS: SunOS\nRelease: 5.10\nCPU Arch: sparc-sun4u-solaris', 0), 'org_id': (1, 0), 'modified': (datetime.datetime(2012, 6, 6, 12, 17, 53, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2b9bf47be510>), 0), 'server_arch_id': (1027, 0), 'secret': ('aab50f2678ac92a12c2732ccfd00da8a', 0), 'last_boot': (0, 0), 'digital_server_id': ('ID-1000010564', 0), 'release': ('5.10', 0), 'channels_changed': (datetime.datetime(2012, 6, 6, 12, 17, 53, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2b9bf47be2d  0>), 0), 'auto_deliver': ('N', 0), 'os': ('SunOS', 0), 'id': (1000010564, 0), 'cobbler_id': (None, 0)}}>


Frame update_packages in /usr/share/rhn/server/handlers/xmlrpc/registration.py at line 923
	                self = <type 'instance'> <server.handlers.xmlrpc.registration.Registration instance at 0x2b9bf47baf80>
	             package = <type 'dict'> {'release': '1', 'epoch': '', 'version': '15', 'arch': 'sparc-solaris-patch', 'name': 'patch-solaris-125095'}
	           system_id = <type 'str'> <?xml version="1.0"?> <params> <param> <value><struct> <member> <name>username</name> <value><string>WickhaPa</string></value>
</member>
<member>
<name>operating_system</name>
<value><string>SunOS</string></value>
</member>
<member>
<name>description</name>
<value><string>Initial Registration Parameters:
OS: SunOS
Release: 5.10
CPU Arch: sparc-sun4u-solaris</string></value>
</member>
<member>
<name>checksum</name>
<value><string>aaccd98e91dcf5d40b0a55af06ebf6f9</string></value>
</member>
<member>
<name>profile_name</name>
<value><string>syd08uatux01</string></value>
</member>
<member>
<name>system_id</name>
<value><string>ID-1000010564</string></value>
</member>
<member>
<name>architecture</name>
<value><string>sparc-sun4u-solaris</string></value>
</member>
<member>
<name>os_release</name>
<value><string>5.10</string></value>
</member>
<member>
<name>fields</name>
<value><array><data>
<value><string>system_id</string></value>
<value><string>os_release</string></value>
<value><string>operating_system</string></value>
<value><string>architecture</string></value>
<value><string>username</string></value>
<value><string>type</string></value>
</data></array></value>
</member>
<member>
<name>type</name>
<value><string>REAL</string></value>
</member>
</struct></value>
</param>
</params>

	            packages = <type 'list'> <ERROR WHILE PRINTING VALUE: string representation too large>
	              server = <class '<CENSORED!>.server.rhnServer.server_class.Server'> <Server Class at 47948821685648: {'self.cert': None, 'self.server': {'info': (None, 0), 'creator_id': (32, 0), 'provision_state_id': (None, 0), 'name': ('syd08uatux01', 0), 'created': (datetime.datetime(2012, 6, 6, 12, 14, 43, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2b9bf47be550>), 0), 'auto_update': ('N', 0), 'running_kernel': ('5.10', 0), 'description': ('Initial Registration Parameters:\nOS: SunOS\nRelease: 5.10\nCPU Arch: sparc-sun4u-solaris', 0), 'org_id': (1, 0), 'modified': (datetime.datetime(2012, 6, 6, 12, 17, 53, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2b9bf47be510>), 0), 'server_arch_id': (1027, 0), 'secret': ('aab50f2678ac92a12c2732ccfd00da8a', 0), 'last_boot': (0, 0), 'digital_server_id': ('ID-1000010564', 0), 'release': ('5.10', 0), 'channels_changed': (datetime.datetime(2012, 6, 6, 12, 17, 53, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2b9bf47be2d  0>), 0), 'auto_deliver': ('N', 0), 'os': ('SunOS', 0), 'id': (1000010564, 0), 'cobbler_id': (None, 0)}}>


Frame call_function in /usr/lib/python2.4/site-packages/<CENSORED!>/server/apacheRequest.py at line 174
	                self = <type 'instance'> <<CENSORED!>.server.apacheRequest.apachePOST instance at 0x2b9bf3c2ca70>
	              params = <type 'tuple'> <ERROR WHILE PRINTING VALUE: string representation too large>
	      force_rollback = <type 'int'> 1
	                func = <type 'instancemethod'> <bound method Registration.update_packages of <server.handlers.xmlrpc.registration.Registration instance at 0x2b9bf47baf80>>
	              method = <type 'unicode'> registration.update_packages

Frame process in /usr/lib/python2.4/site-packages/<CENSORED!>/server/apacheRequest.py at line 476
	                  fd = <type 'instance'> <closed file '<fdopen>', mode 'wb+' at 0x2b9bf4108e40>
	               _body = <type 'str'> <ERROR WHILE PRINTING VALUE: string representation too large>
	              params = <type 'tuple'> <ERROR WHILE PRINTING VALUE: string representation too large>
	              method = <type 'unicode'> registration.update_packages
	                self = <type 'instance'> <<CENSORED!>.server.apacheRequest.apachePOST instance at 0x2b9bf3c2ca70>

Frame handler in /usr/lib/python2.4/site-packages/<CENSORED!>/server/apacheHandler.py at line 196
	                   h = <type 'instance'> <<CENSORED!>.server.rhnSQL.driver_postgresql.Cursor instance at 0x2b9bf40be290>
	                self = <type 'instance'> <<CENSORED!>.server.apacheHandler.apacheHandler instance at 0x2b9bf28f2d88>
	                 req = <type 'mp_request'> <mp_request object at 0x2b9beeedf050>
	                 ret = <type 'int'> 0
	     templateStrings = <type 'dict'> {'email_account_info': '\nAccount Information:\n  Your Spacewalk login:         <login />\n  Your Spacewalk email address: <email-address />', 'email_footer': '--the Spacewalk Team', 'hostname': 'lxsydpin005'}
	                 row = <type 'NoneType'> None

Frame HandlerDispatch in /usr/lib64/python2.4/site-packages/mod_python/apache.py at line 299
	                 req = <type 'mp_request'> <mp_request object at 0x2b9beeedf050>
	                self = <type 'instance'> <mod_python.apache.CallBack instance at 0x2b9beeed7b90>
	              object = <type 'instancemethod'> <bound method apacheHandler.handler of <<CENSORED!>.server.apacheHandler.apacheHandler instance at 0x2b9bf28f2d88>>
	                   l = <type 'list'> ['<CENSORED!>.server.apacheServer', 'Handler']
	              module = <type 'module'> <module '<CENSORED!>.server.apacheServer' from '/usr/lib/python2.4/site-packages/<CENSORED!>/server/apacheServer.pyc'>
	               hlist = <type 'mp_hlist'> {'handler:'<CENSORED!>.server.apacheServer::Handler','directory':'/XMLRPC/','silent':0}
	          object_str = <type 'str'> Handler
	               debug = <type 'int'> 0
	         module_name = <type 'str'> <CENSORED!>.server.apacheServer
	              config = <type 'mp_table'> {'PythonInterpreter': 'rhn.server'}
	                 dir = <type 'str'> /XMLRPC/
	              result = <type 'int'> 500


Environment for PID=5580 on exception:
LANG = C
NLS_LANG = english.AL32UTF8
ORACLE_HOME = /opt/oracle
PATH = /sbin:/usr/sbin:/bin:/usr/bin
PWD = /
SHLVL = 2
TERM = xterm
_ = /usr/sbin/httpd
Comment 1 Jan Pazdziora 2012-06-15 09:55:29 EDT
Fixed in Spacewalk master, 788ed1011b832297571ea5f41f37cb2797eb7f5d.

Making bug public.
Comment 2 Jan Pazdziora 2012-10-30 15:25:37 EDT
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/
Comment 3 Jan Pazdziora 2012-11-01 12:21:27 EDT
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18

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