Bug 980355 - when running install.pl again, after /var/lib/pgsql disk-space check failed, installation fails
Summary: when running install.pl again, after /var/lib/pgsql disk-space check failed, ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Installer
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On:
Blocks: 819032 sat560-blockers
TreeView+ depends on / blocked
 
Reported: 2013-07-02 07:14 UTC by Jan Hutař
Modified: 2016-07-04 00:57 UTC (History)
6 users (show)

Fixed In Version: spacewalk-setup-postgresql-2.0.1-4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-01 21:52:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2013-07-02 07:14:02 UTC
Description of problem:
When running install.pl again, after previous attempt where /var/lib/pgsql disk-space check failed, installation fails as /var/lib/pgsql/data/pg_log is already there


Version-Release number of selected component (if applicable):
Satellite-5.6.0-RHEL6-re20130514.0


How reproducible:
always


Steps to Reproduce:
1. have insufficient space available on /var/lib/pgsql/
2. # ./install.pl
   [...fails due to insufficient space for PostgreSQL DB...]
3. add space to /var/lib/pgsql/
4. # ./install.pl
   [...]
   ** Database:   /var/log/rhn/install_db.log
   *** Progress: #
   Could not install database.


Actual results:
Could not install DB and install_db.log says:

   # cat /var/log/rhn/install_db.log
   Initializing database: mkdir: cannot create directory `/var/lib/pgsql/data/pg_log': File exists
   [FAILED]


Expected results:
Installer should succeed.


Additional info:
This was reported by pgambard:
   From: pgambard
   To: RH Satellite Beta Feedback List <rhn-satellite-beta-list>
   Subject: Re: [sat 56 beta list] Satellite install unable to continue after failed space requirements for pgsql
   Date: Thu, 27 Jun 2013 16:36:20 -0400

Comment 1 Jan Dobes 2013-07-09 07:30:22 UTC
fixed in spacewalk master by commit: f418611ab4aa9af990b8c4b5928439a65fe839c4

Comment 2 Milan Zázrivec 2013-07-09 09:08:39 UTC
We cannot just delete database logs when they are standing in the way
of other error.

Previous commit reverted in bcafd513790824a43bc34dbe6c2b18c51c6e9c89

Comment 4 Milan Zázrivec 2013-09-02 13:29:39 UTC
Correct reproducer for this problem is to:

1. Have postgresql-server installed before Satellite 5.6 installation
2. chcon -t file_t /var/lib/pglib
3. Run Satellite 5.6.0 installation

Before, it would fail with a misleading error message.

The following fix in spacewalk.git master:

    c39912ee8cd6a454359f990f78e0572f70a6832e

checks the SELinux context of /var/lig/pglib before the DB initialization
and prints a error message should the context be incorrect (when installing
Satellite with install.pl / Spacewalk with spacewalk-setup, the message will
be redirected into /var/log/rhn/install_db.log).

Comment 9 Clifford Perry 2013-10-01 21:52:40 UTC
Satellite 5.6 has been released. This bug was tracked under the release.  

This bug was either VERIFIED or RELEASE_PENDING (re-verified prior shortly
before release). 

Moving to CLOSED CURRENT_RELEASE. 

Text from Upgrade Erratum follows:

Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1395.html


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