| Summary: | rhnreg_ks after kickstart install fails with PG backend | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Community] Spacewalk | Reporter: | Julian Einwag <je> | ||||||
| Component: | Server | Assignee: | Michael Mráka <mmraka> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 1.5 | ||||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | spacewalk-backend-1.5.24-1 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2011-07-21 14:43:34 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 695242 | ||||||||
| Attachments: |
|
||||||||
Created attachment 499288 [details]
Makes the query PostgreSQL compatible but will break Oracle compatibility.
Hi Julian, did you consult PostgreSQL Porting Guide on our wiki? There is a couple of similar fixes so you might find out more appropriate fix there - https://fedorahosted.org/spacewalk/wiki/PostgreSQLPortingGuide#Datearithmetics Regards, Michael Created attachment 499302 [details]
Query should now work with both PostgreSQL and Oracle
Hi Michael,
thanks for the hint. I changed the query again so that it should work with both PostgreSQL and Oracle, though I currently don't have an Oracle installation available for testing.
Best regards,
Julian
I did a quick check... current_timestamp + interval ':delta' second doesn't work in oracle, current_timestamp + numtodsinterval(:delta, 'second') works both in oracle and PG. Fixed in spacewalk master as
commit 7d3571ed25b8c9e4b6855e7776ebd72c3faff005
705002 - made query pg compatible
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. Spacewalk 1.5 was released. |
rhnreg_ks after kickstart install fails with PG backend due to an incompatible SQL query in backend/server/rhnAction.py (line 40): insert into rhnAction (id, org_id, action_type, name, scheduler, earliest_action, prerequisite) values (:action_id, :org_id, :action_type_id, :action_name, :scheduler, sysdate + :delta / 86400, :prerequisite) Sysdate does not work with PostgreSQL.