[Spacewalk-list] Spacewalk 1.2 and postgresql sql syntax error

Michael Mraka michael.mraka at redhat.com
Wed Dec 1 21:03:03 UTC 2010


Michal Bruncko wrote:
% Hello,
% 
% I'am receiving in periodical intervals following RHN Traceback about
% sql syntax error.
% I am using spacewalk 1.2 with posgresql db on fedora13. the problem
% seems lies in /usr/lib/python2.6/site-packages/spacewalk/server/rhnVirtualization.py
% but I do no what is wrong with that piece of SQL code.
% Can anybody helps me with this?
...
% SQL Error generated: ('syntax error at or near "name"\nLINE 8:
% rvii.name             name,\n            ^\n', 0, '\n

Hi Michal,

postgresql doesn't like this column alias.
I've fixed it in master, please try apply this patch
http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=22f55da385a604c5362949728feceb79bb476c19

% SELECT\n                rvi.id           rvi_id,\n
% rvi.host_system_id host_system_id,\n
% rvi.virtual_system_id virtual_system_id,\n
% rvi.confirmed         confirmed,\n               rvit.label
% instance_type,\n rvii.name             name,\n
% rvii.memory_size_k memory_size_k,\n                rvii.instance_id
% instance_id,\n             rvii.vcpus            vcpus,\n
% rvis.label          state\n            FROM\n rhnVirtualInstanceInfo
% rvii,\n                rhnVirtualInstanceType rvit,\n
% rhnVirtualInstanceState rvis,\n rhnVirtualInstance rvi\n
% WHERE\n ((rvi.uuid=%(uuid)s and\n                  NOT EXISTS
% (SELECT 1\n
...

Regards,

--
Michael Mráka
Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list