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

postgres: return an empty list of addresses on dns errors #3637

Merged
merged 1 commit into from Sep 30, 2022

Conversation

calebdoxsey
Copy link
Contributor

@calebdoxsey calebdoxsey commented Sep 30, 2022

Summary

The underlying postgres driver supports multiple failover hosts, but only if the DNS address used for the host resolves to an IP address. This PR changes the lookup function so that it does not return an error if a host doesn't resolve and instead returns an empty list of IP addresses. This in turn allows the multiple host capability to work properly.

Related issues

Fixes #3634

Checklist

  • reference any related issues
  • updated docs
  • updated unit tests
  • updated UPGRADING.md
  • add appropriate tag (improvement / bug / etc)
  • ready for review

@calebdoxsey calebdoxsey requested a review from a team as a code owner September 30, 2022 13:41
@calebdoxsey calebdoxsey added bug Something isn't working backport 0-19-0 labels Sep 30, 2022
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 66.58% when pulling c4e5e34 on cdoxsey/postgres-dns into 3fec00f on main.

@calebdoxsey calebdoxsey merged commit 3b2cc67 into main Sep 30, 2022
@calebdoxsey calebdoxsey deleted the cdoxsey/postgres-dns branch September 30, 2022 18:00
calebdoxsey added a commit that referenced this pull request Sep 30, 2022
postgres: return an empty list of addresses on dns errors (#3637)

Co-authored-by: Caleb Doxsey <cdoxsey@pomerium.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 0-19-0 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

postgres databroker backend doesn't handle multiple nodes/failover
3 participants