Project

General

Profile

Actions

Bug #34136

closed

foreman-maintain service fails for external postgres service, when no psql utility installed

Added by Amit Upadhye over 2 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2029807

Description of problem:
foreman-maintain service fails for external Postgres service when no psql utility is installed with message unable to connect to the remote database.

Version-Release number of selected component (if applicable):
Satellite 6.10.1.1
rubygem-foreman_maintain-0.8.21-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Configure repos for satellite, and install satellite package.
2. Install and configure Postgres on rhel as per documentation1
3. Run the installer as mentioned in documention1 to configure satellite with external DB, which fails with BZ 2029793
4. Check the status of the external PostgreSQL service, which fails with the following message,
  1. foreman-maintain service status --only postgresql
    Running Status Services ================================================================================
    Get status of applicable services:

Displaying the following service(s):
postgresql (pulpcore), postgresql (candlepin), postgresql (foreman)
/ displaying postgresql (pulpcore)
postgresql (pulpcore) is remote and is DOWN.
Unable to connect to the remote database.
See the log (/var/log/foreman-maintain/foreman-maintain.log) for more details.
/ displaying postgresql (candlepin)
postgresql (candlepin) is remote and is DOWN.
Unable to connect to the remote database.
See the log (/var/log/foreman-maintain/foreman-maintain.log) for more details.
/ displaying postgresql (foreman)
postgresql (foreman) is remote and is DOWN.
Unable to connect to the remote database.
See the log (/var/log/foreman-maintain/foreman-maintain.log) for more details.
/ All services displayed [FAIL]
Some services are not running (postgresql (pulpcore), postgresql (candlepin), postgresql (foreman))
--------------------------------------------------------------------------------

Actual results:
a message like, "Unable to connect to the remote database, see logs"

Expected results:
Message something like, "The psql command not found. Make sure the system has a psql utility installed."

Additional info:
This BZ2 has provided a similar fail-safe option for backup/restore when psql is unavailable with methods like "psql_cmd_available?" for Postgres and "mongo_cmd_available?" for Mongo.

[1] https://access.redhat.com/documentation/en-us/red_hat_satellite/6.10/html/installing_satellite_server_from_a_connected_network/performing-additional-configuration#using-external-databases_satellite
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1921295

Actions #1

Updated by The Foreman Bot over 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_maintain/pull/572 added
Actions #2

Updated by Eric Helms 4 months ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF