Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 822115

Summary: spacewalk-setup on CentOS Postgres not working
Product: [Community] Spacewalk Reporter: daniel.gerne
Component: InstallationAssignee: Jan Pazdziora (Red Hat) <jpazdziora>
Status: CLOSED WORKSFORME QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.7   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-16 16:46:10 UTC Type: Bug
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: 871344    

Description daniel.gerne 2012-05-16 11:30:50 UTC
Description of problem:
The script has several issues. The documentation states that the only prerequisite is to have a database account having a password set. This misses that a database must exist (CREATE DATABASE xxx;). 

When I execute spacewalk-setup it will fail to populate db because there is no Language plpgsql. Therefore I switched to psql and created the language with 
CREATE LANGAUGE plpgsql;
Then i try again and this time the populate log will tell me 'relation xyz already exists'. I therefore delete the database and the language und recreate them. The next attempt I will get the 'no language plpgsql' error again (despite created as found in pg documentation)

Version-Release number of selected component (if applicable):
1.7

How reproducible:
https://fedorahosted.org/spacewalk/wiki/HowToInstall
  
Actual results:
Failed to populate database.

Expected results:
database populated.

Additional info:
I therefore think either there is a bug in 'spacewalk-setup' or the HowToInstall is missing some steps specific for postgres when it comes to the language.

Comment 1 Jan Pazdziora (Red Hat) 2012-05-16 16:46:10 UTC
https://fedorahosted.org/spacewalk/wiki/HowToInstall#PostgreSQLPre-Requisites

In order to get Spacewalk to run with PostgreSQL database backend, you need PostgreSQL 8.4 server installed on the same or different machine. Use PostgreSQLServerSetup as a guide to get the server installed and setup. 

and the https://fedorahosted.org/spacewalk/wiki/PostgreSQLServerSetup gives step by step instructions, addressing all issues you mention.