Bug 903487 - spacewalk-setup-postgresql fails when using postgresql >= 9.1
spacewalk-setup-postgresql fails when using postgresql >= 9.1
Product: Spacewalk
Classification: Community
Component: Installation (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Jan Pazdziora
Red Hat Satellite QA List
Depends On:
Blocks: space19
  Show dependency treegraph
Reported: 2013-01-24 01:12 EST by Nicholas Nachefski
Modified: 2013-03-06 13:34 EST (History)
1 user (show)

See Also:
Fixed In Version: spacewalk-setup-embedded-postgresql-1.9.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-03-06 13:34:43 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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 01:12 EST, Nicholas Nachefski
no flags Details | Diff

  None (edit)
Description Nicholas Nachefski 2013-01-24 01:12:33 EST
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"

# rpm -qf /usr/bin/spacewalk-setup-embedded-postgresql

The fix is to remove the 'createlang' statement from /usr/bin/spacewalk-setup-embedded-postgresql.  patch is attached...
Comment 1 Jan Pazdziora 2013-02-04 04:58:03 EST
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 12:07:18 EST
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 13:34:43 EST
Spacewalk 1.9 has been released.


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