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

Backport of [NET-10952] fix cluster dns lookup family to gracefully handle ipv6 into release/1.19.x #21720

Conversation

hc-github-team-consul-core
Copy link
Contributor

Backport

This PR is auto-generated from #21703 to be assessed for backporting due to the inclusion of the label backport/1.19.

The below text is copied from the body of the original PR.


Description

When creating an envoy cluster the default DNS Lookup Family defaults to AUTO, for inter-cluster communication this is not an issue but when creating a cluster that access external sources (like we do for JWTProviders) this can cause an issue. The AUTO setting prefers using ipv6, so if a user has a cluster that is not setup to handle ipv6 they will get an ipv6 address back for the external source and will be unable to connect.

To handle this we will be using the V4_PREFERRED lookup family when STRICT_DNS is enabled (STRICT_DNS will grab all addresses for the target and attempt to make a host for each and load balance between them).

When
LOGICAL_DNS is enabled (LOGICAL_DNS will grab all the addresses and only use the first when a new connection is needed) we will use the ALL lookup family, which fetches all the ip addresses for a given hostname and cycles through them to find the first one that is reachable using happy eyeballs

If any other DNS Discovery Type is used we fallback to the default of AUTO because envoy ignores the Lookup Family for all other cluster types.

Testing & Reproduction

Links

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/NET-10952-fix-cluster-dns-lookup-family-to-gracefully-handle-ipv6/slowly-neat-jackass branch from bdff3fc to 84b0c0d Compare September 12, 2024 15:38
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approved Consul Bot automated PR

@github-actions github-actions bot added the theme/envoy/xds Related to Envoy support label Sep 12, 2024
@jm96441n jm96441n merged commit cffdc98 into release/1.19.x Sep 12, 2024
104 checks passed
@jm96441n jm96441n deleted the backport/NET-10952-fix-cluster-dns-lookup-family-to-gracefully-handle-ipv6/slowly-neat-jackass branch September 12, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/envoy/xds Related to Envoy support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants