Closed jrafanie closed 2 years ago
Verified this manually:
For:
production:
adapter: postgresql
encoding: utf8
username: root
pool: 5
wait_timeout: 5
min_messages: warning
database: vmdb_production
password: v2:{qEcSjRYDVMdL7uHjCkvYPw==}
Result:
localhost 5432 - accepting connections
vmdb_production is up and running
For:
production:
adapter: postgresql
encoding: utf8
username: root
pool: 5
wait_timeout: 5
min_messages: warning
database: vmdb_production
host: 10.0.2.10
port: 5432
password: v2:{qEcSjRYDVMdL7uHjCkvYPw==}
Result:
10.0.2.10 5432 - accepting connections
vmdb_production is up and running
I'll just close this if it's not the right surgical fix. 🤷
This PR will let psql handle missing host/port/password values. For our ncat call, we previously defaulted a missing port to 5432. We now do the same for host and default to localhost.
This should resolve an issue where database.yml didn't have a
host
field and we'd see this in the journalctl:Before
After