Bug 1085033
| Summary: | rhnsearchd connecting to PostgreSQL over 127.0.0.1 regardless of whats configured in /etc/rhn.conf | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Spacewalk | Reporter: | Paul Robert Marino <prmarino1> | ||||
| Component: | Server | Assignee: | Michael Mráka <mmraka> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 2.1 | CC: | cperry, jesse, tlestach | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1146023 (view as bug list) | Environment: | |||||
| Last Closed: | 2015-04-14 19:04:04 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1207293 | ||||||
| Attachments: |
|
||||||
|
Description
Paul Robert Marino
2014-04-07 15:05:43 UTC
Created attachment 931659 [details]
Patch for rhnsearchd on external PostgreSQL
This patch made rhnsearchd work with external PostgreSQL, but I haven't tested it with "embedded" PostgreSQL yet.
This patch is against the SRPM of the current stable version (2.2.8).
Hello, the patch does not seem to be correct. The 'else' path at [1] constructs the 'db_name' according to your rhn.conf file. What does # egrep 'db_(host|name|port)' /etc/rhn/rhn.conf say? [1] https://github.com/spacewalkproject/spacewalk/blob/master/search-server/spacewalk-search/src/java/com/redhat/satellite/search/db/DatabaseManager.java#L76 (In reply to Tomas Lestach from comment #2) > Hello, > > the patch does not seem to be correct. > The 'else' path at [1] constructs the 'db_name' according to your rhn.conf > file. > > What does > # egrep 'db_(host|name|port)' /etc/rhn/rhn.conf > say? > > [1] > https://github.com/spacewalkproject/spacewalk/blob/master/search-server/ > spacewalk-search/src/java/com/redhat/satellite/search/db/DatabaseManager. > java#L76 # egrep 'db_(host|name|port)' /etc/rhn/rhn.conf db_name = spacewalk db_host = pgsql.example.com db_port = 5432 Without adding db_host to the list of "options" (which is what I assume https://github.com/spacewalkproject/spacewalk/blob/master/search-server/spacewalk-search/src/java/com/redhat/satellite/search/db/DatabaseManager.java#L69 does), db_host is empty, so it can't get added to the jdbcUrl property at https://github.com/spacewalkproject/spacewalk/blob/master/search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/config.xml#L19 This made rhn-search work for me, but I have no idea if it's the right solution 8-) That you for the provided information, now I see the issue. spacewalk.git: 4073abaf7bc7f17b738bcc0ca64e657ab9d074bf Moving bugs to ON_QA as we move to release Spacewalk 2.3 Spacewalk 2.3 has been released. See https://fedorahosted.org/spacewalk/wiki/ReleaseNotes23 |