Bug 671466 - error with PgSQL backend during rhn_check
Summary: error with PgSQL backend during rhn_check
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space14
TreeView+ depends on / blocked
 
Reported: 2011-01-21 15:36 UTC by Miroslav Suchý
Modified: 2011-04-26 09:10 UTC (History)
1 user (show)

Fixed In Version: spacewalk-backend-1.4.22-1
Clone Of:
Environment:
Last Closed: 2011-04-26 09:10:15 UTC
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2011-01-21 15:36:52 UTC
Description of problem:
From mailing list:
Exception reported from satellite
Time: Fri Jan 21 15:19:19 2011
Exception type spacewalk.server.rhnSQL.sql_base.SQLStatementPrepareError
Exception while handling function queue.get
Request object information:
URI: /XMLRPC
Remote Host: pegasus01.intra.astro.rug.nl
Server Name: 127.0.0.1:0
Headers passed in:
	Accept-Encoding: identity
	Content-Length: 2686
	Host: satellite
	content-type: text/xml
	user-agent: rhn.rpclib.py/$Revision$
	x-client-version: 1
	x-info: RPC Processor (C) Red Hat, Inc (version $Revision$)
	x-rhn-client-capability: packages.verifyAll(1)=1,caneatCheese(1)=1,packages.extended_profile(2)=1,reboot.reboot(1)=1,packages.verify(1)=1,packages.runTransaction(1)=1,packages.update(2)=2,packages.rollBack(1)=1,packages.verifyAll(1)=1,caneatCheese(1)=1,packages.extended_profile(2)=1,reboot.reboot(1)=1,packages.verify(1)=1,packages.runTransaction(1)=1,packages.update(2)=2,packages.rollBack(1)=1
	x-rhn-transport-capability: follow-redirects=3
	x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc (version $Revision$)
	x-up2date-version: 1.3.9-1.el6
Extra information about this error:
SQL Error generated: ('syntax error at or near "name" at character 38\n', 0, '\n    select distinct\n        pn.name name,\n        pe.epoch epoch,\n        pe.version version,\n        pe.release release,\n        pa.label  arch\n    from rhnActionPackage ap,\n        rhnPackage p,\n        rhnPackageName pn,\n        rhnPackageEVR pe,\n        rhnPackageArch pa,\n        rhnServerChannel sc,\n        rhnChannelPackage cp\n    where ap.action_id = %(actionid)s\n        and ap.evr_id is not null\n        and ap.evr_id = p.evr_id\n        and ap.evr_id = pe.id\n        and ap.name_id = p.name_id\n        and ap.name_id = pn.id\n        and ap.package_arch_id = pa.id(+)\n        and p.id = cp.package_id\n        and cp.channel_id = sc.channel_id\n        and sc.server_id = %(serverid)s\n    union\n    select distinct\n        pn.name name,\n        null version,\n        null release,\n        null epoch,\n        pa.label arch\n    from rhnActionPackage ap,\n        rhnPackag!

 e p,\n        rhnPackageName pn,\n        rhnPackageArch pa,\n        rhnServerChannel sc,\n        rhnChannelPackage cp\n    where ap.action_id = %(actionid)s\n        and ap.evr_id is null\n        and ap.name_id = p.name_id\n        and p.name_id = pn.id\n        and ap.package_arch_id = pa.id(+)\n        and p.id = cp.package_id\n        and cp.channel_id = sc.channel_id\n        and sc.server_id = %(serverid)s')

Exception Handler Information
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/spacewalk/server/apacheRequest.py", line 118, in call_function
    response = apply(func, params)
  File "/usr/share/rhn/server/handlers/xmlrpc/queue.py", line 326, in get
    ret = self.__getV2(action)
  File "/usr/share/rhn/server/handlers/xmlrpc/queue.py", line 84, in __getV2
    result = method(self.server_id, action['id'], dry_run)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/action/packages.py", line 112, in update
    h.execute(serverid=serverId, actionid=actionId)
  File "/usr/lib/python2.4/site-packages/spacewalk/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/spacewalk/server/rhnSQL/driver_postgresql.py", line 263, in _execute_wrapper
    raise rhnSQL.SQLStatementPrepareError(0, str(e), self.sql)
SQLStatementPrepareError: ('syntax error at or near "name" at character 38\n', 0, '\n    select distinct\n        pn.name name,\n        pe.epoch epoch,\n        pe.version version,\n        pe.release release,\n        pa.label  arch\n    from rhnActionPackage ap,\n        rhnPackage p,\n        rhnPackageName pn,\n        rhnPackageEVR pe,\n        rhnPackageArch pa,\n        rhnServerChannel sc,\n        rhnChannelPackage cp\n    where ap.action_id = %(actionid)s\n        and ap.evr_id is not null\n        and ap.evr_id = p.evr_id\n        and ap.evr_id = pe.id\n        and ap.name_id = p.name_id\n        and ap.name_id = pn.id\n        and ap.package_arch_id = pa.id(+)\n        and p.id = cp.package_id\n        and cp.channel_id = sc.channel_id\n        and sc.server_id = %(serverid)s\n    union\n    select distinct\n        pn.name name,\n        null version,\n        null release,\n        null epoch,\n        pa.label arch\n    from rhnActionPackage ap,\n        rhnP!

 ackage p,\n        rhnPackageName pn,\n        rhnPackageArch pa,\n        rhnServerChannel sc,\n        rhnChannelPackage cp\n    where ap.action_id = %(actionid)s\n        and ap.evr_id is null\n        and ap.name_id = p.name_id\n        and p.name_id = pn.id\n        and ap.package_arch_id = pa.id(+)\n        and p.id = cp.package_id\n        and cp.channel_id = sc.channel_id\n        and sc.server_id = %(serverid)s')

Comment 1 Miroslav Suchý 2011-01-21 16:35:50 UTC
Fixed in commit 7721a8e21f945922daa07a11367bb5e44efa6c0e

Comment 2 Tomas Lestach 2011-02-03 12:21:13 UTC
Moving ON_QA ...

Comment 3 Tomas Lestach 2011-02-08 08:40:55 UTC
This bug has been fixed in Spacewalk 1.3.

Comment 4 Jan Pazdziora (Red Hat) 2011-03-23 08:27:49 UTC
Nope, not fixed in 1.3 -- Justin just committed 659d27036cf7f4b43afaacbf8de3c726453ae6e2 which makes the SQL correct.

Comment 5 Jan Pazdziora (Red Hat) 2011-03-23 08:29:05 UTC
We anticipate this change to go to spacewalk-backend-1.4.22-1 (not tagged yet).

Comment 6 Miroslav Suchý 2011-04-11 07:45:01 UTC
Mass moving to ON_QA before release of Spacewalk 1.4

Comment 7 Miroslav Suchý 2011-04-26 09:10:15 UTC
Spacewalk 1.4 has been released


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