Bug 462910 - [patch] postgres-8.sh and metadata fixes for rhel5
Summary: [patch] postgres-8.sh and metadata fixes for rhel5
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Marek Grac
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 466249
TreeView+ depends on / blocked
 
Reported: 2008-09-19 16:21 UTC by Lon Hohberger
Modified: 2009-04-16 22:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 20:56:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch (2.79 KB, patch)
2008-09-19 17:23 UTC, Lon Hohberger
no flags Details | Diff
patch to make postgres-8.sh use su instead of sudo (596 bytes, patch)
2008-11-28 17:24 UTC, Nicolas MONNET
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0101 0 normal SHIPPED_LIVE rgmanager bug-fix and enhancements update 2009-01-20 16:04:34 UTC

Description Lon Hohberger 2008-09-19 16:21:06 UTC
Description of problem:

Postgres 8.1.11 as shipped with RHEL5 does not work with the postgres-8.sh / postgres-8.metadata files.

(1) [FEATURE] The default config file is given, but the default data directory should also be given.

(2) [BUG] Postmaster 8.1.11 looks for ip_addresses, not ip_address in postgresql.conf.  This causes postmaster to fail to start.

(3) [BUG] The PID file directory, /var/run/cluster/postgres-8, is owned by root/root.  This makes it impossible for the postmaster program (running as 'postgres' typically) to create a PID file there.  A solution is to create the file but leave it empty prior to starting postmaster & changing the ownership of the file to the postgres user.

(4) [BUG] post master doesn't fork; we should spawn it in the background

Comment 1 Lon Hohberger 2008-09-19 17:22:51 UTC
one might also unlink the PID file if it was empty in stop_generic()

Comment 2 Lon Hohberger 2008-09-19 17:23:47 UTC
Created attachment 317213 [details]
Patch

Comment 3 RHEL Program Management 2008-09-23 15:41:42 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 RHEL Program Management 2008-09-26 09:47:27 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 7 Nicolas MONNET 2008-11-28 17:24:57 UTC
Created attachment 325029 [details]
patch to make postgres-8.sh use su instead of sudo

I have an additional problem with this package wrt postgres-8.sh, that is not corrected by the previous patch. The "sudo" statement doesn't work, it complains (once I have redirected to a file instead of /dev/null) about needing a pty. Replacing sudo by su -c works (see patch).

Why use sudo in the first place? It's dependent upon a working /etc/sudoers while su should work all the time for root. 

sudo-1.6.8p12-12.el5.x86_64.rpm
rgmanager-2.0.43-1.el5.x86_64.rpm

Note that I'm using Postgres 8.3.3 (upstream), but this bug doesn't look like something caused by postgres, does it?

Comment 8 Nicolas MONNET 2008-11-28 17:47:23 UTC
Addendum: the script is rendered quite fragile by the fact that it fails to start if a pid file exists (even zero-length). This needs to be fixed.

Comment 10 Lon Hohberger 2008-12-03 20:26:02 UTC
Without changing sudo to su as described, rgmanager "successfully" starts the postgres application when actually it's not running at all.

Comment 12 Lon Hohberger 2008-12-03 21:03:09 UTC
(In reply to comment #8)
> Addendum: the script is rendered quite fragile by the fact that it fails to
> start if a pid file exists (even zero-length). This needs to be fixed.

Agreed.  However, this is a different issue which affects config-utils.sh generally.

Comment 13 Lon Hohberger 2008-12-03 21:13:51 UTC
(In reply to comment #12)
> (In reply to comment #8)
> > Addendum: the script is rendered quite fragile by the fact that it fails to
> > start if a pid file exists (even zero-length). This needs to be fixed.
> 
> Agreed.  However, this is a different issue which affects config-utils.sh
> generally.

https://bugzilla.redhat.com/show_bug.cgi?id=474444 <-- pid file issue

Comment 15 errata-xmlrpc 2009-01-20 20:56:53 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0101.html


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