Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: treat a successful PG conn and auth as a preflight success #818

Merged
merged 1 commit into from
Apr 22, 2016

Conversation

adamleff
Copy link
Contributor

Currently, if the PostgreSQL preflight check is able to connect to the
DB and authenticate (due to a pg_hba trust entry, for example) but is
unable to find the not-expected-to-be-there database name in question,
it treats the preflight connection check as a failure.

An example of such a condition would be configuring Chef Server and
Delivery on the same node and configuring Chef Server to use Delivery's
database. Delivery's pg_hba.conf trusts local connections, so a
chef-server-ctl reconfigure will fail the preflight checks because
it connects to the DB but fails to find the fake database.

This change treats a successful connection and auth as a success during
pre-flight and also adds tests for the #connectivity_validation method
which previously had none.

…cess

Currently, if the PostgreSQL preflight check is able to connection to the
DB *and* authenticate (due to a pg_hba trust entry, for example) but is
unable to find the not-expected-to-be-there database name in question,
it treats the preflight connection check as a failure.

An example of such a condition would be configuring Chef Server and
Delivery on the same node and configuring Chef Server to use Delivery's
database. Delivery's pg_hba.conf trusts local connections, so a
`chef-server-ctl reconfigure` will fail the preflight checks because
it connects to the DB but fails to find the fake database.

This change treats a successful connection and auth as a success during
pre-flight and also adds tests for the `#connectivity_validation` method
which previously had none.
@ryancragun
Copy link
Contributor

🎯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants