Bug 704446 - Opening the locale settings for a kickstart profile results in error (with PG backend)
Summary: Opening the locale settings for a kickstart profile results in error (with PG...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.5
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space15
TreeView+ depends on / blocked
 
Reported: 2011-05-13 07:41 UTC by Julian Einwag
Modified: 2011-07-21 14:42 UTC (History)
1 user (show)

Fixed In Version: spacewalk-java-1.5.29-1
Clone Of:
Environment:
Last Closed: 2011-07-21 14:42:59 UTC
Embargoed:


Attachments (Terms of Use)
Converts ksid to long before handing it to the SQL query (865 bytes, application/octet-stream)
2011-05-13 07:41 UTC, Julian Einwag
no flags Details

Description Julian Einwag 2011-05-13 07:41:15 UTC
Created attachment 498711 [details]
Converts ksid to long before handing it to the SQL query

When I try to change the locale settings for a kickstart profile via "System Details" -> "Locale", I get an internal server error due to an SQL exception.

The problem ist that the query "valid_timezone_for_kickstart_profile" in ./java/code/src/com/redhat/rhn/common/db/datasource/xml/General_queries.xml expects a numeric parameter ksid, but the method getValidTimezones in ./java/code/src/com/redhat/rhn/manager/kickstart/KickstartLister.java assigns a string. This results in an SQL exception since PostgreSQL doesn't do an implicit cast.

The attached patch fixes the problem, though I'm not sure it's the proper way to do so.

Comment 1 Michael Mráka 2011-05-16 08:15:18 UTC
I think function should get Long rather than casting it to string and then back.

Fixed in master by
commit be6374188bebab573ba993c9d57f9258ad6043a2
    704446 - removed unnecessary cast to string

Comment 2 Jan Pazdziora (Red Hat) 2011-07-19 19:36:39 UTC
This bugzilla is currently MODIFIED, so we believe the fix is in the Spacewalk nightly yum repository at http://spacewalk.redhat.com/yum/nightly/

Therefore, moving ON_QA.

Comment 3 Jan Pazdziora (Red Hat) 2011-07-21 14:42:59 UTC
Spacewalk 1.5 was released.


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