-
Bug
-
Resolution: Done
-
Major
-
6.15.3
Description of problem:
Using a password with special character " for external database will cause Satellite installation to complete successfully but satellite-maintain commands reports failure even though the services are working fine.
How reproducible:
Always
Is this issue a regression from an earlier version:
NA
Steps to Reproduce:
1. Install PostgreSQL on an external server as described in the documentation.
2. While creating the database provide the password for database with ". For example, test1"2
3. Install the Satellite with the external database. The password for the database was passed as follows.
--foreman-proxy-content-pulpcore-postgresql-password 'test1"3'
4. Execute the following commands on the Satellite
satellite-maintain service status -b satellite-maintain health check
Actual behavior:
The database with the special character password reports a failure.
# satellite-maintain service status -b Running Status Services ================================================================================ Get status of applicable services: Displaying the following service(s): redis, postgresql (candlepin), postgresql (foreman), postgresql (pulpcore), pulpcore-api, pulpcore-content, pulpcore-worker@1.service, pulpcore-worker@2.service, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy / displaying redis [OK] / displaying postgresql (candlepin) [OK] / displaying postgresql (foreman) [OK] / displaying postgresql (pulpcore) [FAIL] / displaying pulpcore-api [OK] / displaying pulpcore-content [OK] - displaying pulpcore-worker@1.service [OK] - displaying pulpcore-worker@2.service [OK] - displaying tomcat [OK] - displaying dynflow-sidekiq@orchestrator [OK] - displaying foreman [OK] - displaying httpd [OK] - displaying dynflow-sidekiq@worker-1 [OK] - displaying dynflow-sidekiq@worker-hosts-queue-1 [OK] - displaying foreman-proxy [OK] - All services displayed [FAIL] Some services are not running (postgresql (pulpcore)) --------------------------------------------------------------------------------
The satellite-installer passed the password correctly.
# grep pulpcore_postgresql_password /etc/foreman-installer/scenarios.d/satellite-answers.yaml pulpcore_postgresql_password: test1"3
Expected behavior:
satellite-maintain should report the correct status of the external database even if the special character is used.
Business Impact / Additional info:
The issue seems to associated with usage the particular special character in the password and how satellite-maintain is parsing it. We should either how satellite-maintain parses the password or mention in the documentation about the password requirements.
- depends on
-
SAT-28817 pass PGPASSWORD via env directly, not via shell by evgeni · Pull Request #939 · theforeman/foreman_maintain · GitHub
-
- Closed
-
-
SAT-28833 load pulpcore db configuration by asking django, not by parsing python by evgeni · Pull Request #941 · theforeman/foreman_maintain · GitHub
-
- Closed
-
-
SAT-28834 properly escape quotes in passwords by calling to_python by evgeni · Pull Request #361 · theforeman/puppet-pulpcore · GitHub
-
- Closed
-
-
SAT-28835 properly escape quotes in passwords by calling to_ruby by evgeni · Pull Request #1189 · theforeman/puppet-foreman · GitHub
-
- Closed
-
-
SAT-28904 Refactor BaseDatabase class for simplicity by ekohl · Pull Request #945 · theforeman/foreman_maintain · GitHub
-
- Closed
-
- is cloned by
-
SAT-30285 satellite-maintain health check and service status reports external database as fail if the password has special character
-
- Closed
-