Bug 536427 - (RHQ-778) Postgres is not autodiscoverable when run as as a different user from the agent process
Postgres is not autodiscoverable when run as as a different user from the age...
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
All All
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Sunil Kondkar
Depends On: RHQ-253
  Show dependency treegraph
Reported: 2008-09-02 11:09 EDT by Jeff Weiss
Modified: 2014-11-09 17:50 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
RHEL, fedora, postgres 8.2.6, 8.2.9
Last Closed: 2013-09-02 03:21:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeff Weiss 2008-09-02 11:09:00 EDT
I have not been able to get postgres to be auto-discoverable when run as postgres user.  I have been able to add it manually after RHQ-253 was fixed.  

How to repeat:
Run postgres and RHQ agent on the same machine, with postgres and agent running as different users (I used postgres as postgres, and the agent as jweiss).  When you import the newly discovered inventory from the agent, the postgres server will not be among the servers discovered.
Comment 1 Jason Dobies 2008-09-02 15:36:32 EDT
FYI, this works for me in HEAD as of Sept 2 at about 3:30pm. My postgres instance runs as the postgres user and my agent is running under jdob. I saw the postgres instance inventoried.
Comment 2 Jeff Weiss 2008-09-02 16:25:21 EDT
I'm sure this has nothing to do with rev# at this point.  Greg says it worked for him too and I think that was on an older rev than I am running.  I believe there's a environmental difference, we need to figure out what it is.   Is there some debug output that might shed light on where it's going wrong for me?

Comment 3 Mark Burchard 2009-01-13 12:01:07 EST
Different postgres installations have different file permissions for the postgres "data" directory.  At least in the case of the postgres 8.3.5 package from enterprisedb, the perms on "data" are set to 700, meaning that postgresql.conf can only be read by the postgres user or root.  The version of postgres-server that comes down from fedora910 and rhel5  yum sets 700 on the /var/lib/pgsql directory (one level above where the enterprisedb version sets 700), even more restrictive.

Under these conditions, the postgres instance is discovered and inventoried, but the inability to read data/postgresql.conf throws an error in the logs and limits the information available about the postgres config.
Comment 4 Red Hat Bugzilla 2009-11-10 16:16:42 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-778
Comment 5 Corey Welton 2010-10-06 23:10:49 EDT
sunil, take a quick look at this one.  it can probably be closed but let's see.
Comment 6 Sunil Kondkar 2010-10-19 06:37:29 EDT
Verified on rhq build#423

started postgres and RHQ agent on the same machine, with postgres and agent running as different users. Postgres is auto discovered and imported successfully.
Comment 7 Heiko W. Rupp 2013-09-02 03:21:25 EDT
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.

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