Bug 903487 - spacewalk-setup-postgresql fails when using postgresql >= 9.1
Summary: spacewalk-setup-postgresql fails when using postgresql >= 9.1
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Installation
Version: 1.8
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jan Pazdziora (Red Hat)
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space19
TreeView+ depends on / blocked
 
Reported: 2013-01-24 06:12 UTC by Nicholas Schuetz
Modified: 2013-03-06 18:34 UTC (History)
1 user (show)

Fixed In Version: spacewalk-setup-embedded-postgresql-1.9.1-1
Clone Of:
Environment:
Last Closed: 2013-03-06 18:34:43 UTC
Embargoed:


Attachments (Terms of Use)
removes the createland statement from /usr/bin/spacewalk-setup-embedded-postgresql which allows the install to complete successfully (155 bytes, patch)
2013-01-24 06:12 UTC, Nicholas Schuetz
no flags Details | Diff

Description Nicholas Schuetz 2013-01-24 06:12:33 UTC
Created attachment 686475 [details]
removes the createland statement from /usr/bin/spacewalk-setup-embedded-postgresql which allows the install to complete successfully

spacewalk-setup fails w/ postgres backend on a fresh Fedora 17 install.  The reason is because Postgresql >= 9.1 automatically includes plpsql in the template.  See below.


[root@spacewalk01 ~]# spacewalk-setup --disconnected
** Database: Setting up database connection for PostgreSQL backend.
Database "rhnschema" does not exist
** Database: Installing the database:
** Database: This is a long process that is logged in:
** Database:   /var/log/rhn/install_db.log
*** Progress: ##
Could not install database.

[root@spacewalk01 ~]# cat /var/log/rhn/install_db.log
Note: Forwarding request to 'systemctl enable postgresql.service'.
Redirecting to /bin/systemctl start  postgresql.service
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /run/user/nick/gvfs
      Output information may be incomplete.
createlang: language "plpgsql" is already installed in database "rhnschema"

Versions:
# rpm -qf /usr/bin/spacewalk-setup-embedded-postgresql
spacewalk-setup-embedded-postgresql-1.8.3-1.fc17.noarch


The fix is to remove the 'createlang' statement from /usr/bin/spacewalk-setup-embedded-postgresql.  patch is attached...

Comment 1 Jan Pazdziora (Red Hat) 2013-02-04 09:58:03 UTC
Thank you for reporting this issue. Merely removing that createlang command would cause the setup to fail on older PostgreSQL versions. I've now added a check for existence of the language in the new database, in Spacewalk master, 2bcd1fdff0ec0183dc102482995a6681586cb4f1.

Comment 2 Stephen Herr 2013-03-01 17:07:18 UTC
Marking bug as ON_QA since tonight's build of Spacewalk nightly is a release candidate for Spacewalk 1.9.

Comment 3 Stephen Herr 2013-03-06 18:34:43 UTC
Spacewalk 1.9 has been released.

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes19


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