Bug 704446

Summary: Opening the locale settings for a kickstart profile results in error (with PG backend)
Product: [Community] Spacewalk Reporter: Julian Einwag <je>
Component: ServerAssignee: Michael Mráka <mmraka>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.5CC: slukasik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-java-1.5.29-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 14:42:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 695242    
Attachments:
Description Flags
Converts ksid to long before handing it to the SQL query none

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.