forked from yugabyte/yugabyte-db
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[yugabyte#3644] Allow ability to specify and prefer IPv6 addresses in…
… bind addresses Summary: The primary goal of this diff is to allow yugabyte to work in IPv6-only environments without disturbing much of how it works presently in IPv4 environments. Some of the behavior in dual stack environments may still need fixes in future diffs. 1. Allow resolution to return IPv6 addresses 2. Add the ability to prefer IPv4/IPv6 addresses of certain types when multiple addresses are available. This is the case when a single domain name resolves to multiple IP addrs (via getaddrinfo, family AF_UNSPEC). This is also the case when bind to 0.0.0.0 or [::] is specified and multiple local addresses are available to advertise to other nodes (AddHostPortPBs -> GetLocalAddresses). In particular, IPv6 link local addresses like 'fe80::1%lo' which are commonly present on macbooks are not browser friendly, so added an ipv6_non_link_local filter that prefers loopback address like [::1] over [fe80::1%lo] when both are available. 3. Include HostPort parsing from the PR yugabyte#3765 and fix some of the behavior within. Test Plan: 1. Test yb-ctl on local dev server, verify IP4 behavior is unchanged. 2. Tested on dual stack nodes with both IPv4 and IPv6 addresses. Verified that when 0.0.0.0 is specified and local_address_filter, resolve_address_filter are at default values (preferring ipv4), the server binds to and advertises IPv4 interfaces. When '[::]' is specified and local_address_filter, resolve_address_filter are changed to 'ipv6_external,ipv4_non_link_local,ipv6_all', verify that the server binds to and advertises IPv6 IPs. 3. Verified binding to DNS names with local_address_filter, resolve_address_filter set to 'ipv6_external,ipv6_non_link_local,ipv6_all' that the rpc and web server bind to IPv6 IPs. pgsql_proxy_bind_address works differently with postgres binding to both IPv4 and IPv6 addresses when a DNS name with both IPv4 and IPv6 addresses is specified (because it does not understand these filter flags). 4. Added some unit tests to verify the bind address parsing and the address filtering functionality. Reviewers: bogdan, sergei Reviewed By: sergei Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D8675
- Loading branch information
Showing
16 changed files
with
383 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.