Skip to content

Add ipv6 support to docker container - #13829

Draft
edameki wants to merge 4 commits into
apple:mainfrom
edameki:fdb.bash-ipv6-support
Draft

Add ipv6 support to docker container#13829
edameki wants to merge 4 commits into
apple:mainfrom
edameki:fdb.bash-ipv6-support

Conversation

@edameki

@edameki edameki commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Added functionality for fdb.bash to support ipv6, provided the new env variable FDB_IP_VERSION is set to 6 (or any string containing 6, such as v6, ipv6, iwantipv6, etc. )

There is an unfortunate caveat of no dual stack support, as FDB coordinators are recognized by their IP+port and not their machineid, to the best of my knowledge. If I'm wrong and FDB does not double count a coordinator with both IPv4 and IPv6 addresses in the cluster file, I would be happy to add dual stack support to this.

This was part of now-split-up #13822, with slightly more robust logic.

Changes

IPv6 Support

Issue

Before now, fdb.bash would throw an error if hostname -i resolved to a v6 address, as it would not be encased in brackets.

New Behavior

Depending on the value of FDB_IP_VERSION, fdb.bash will try and find the machine's v4 or v6 address. IPv4 is the default pick.

If hostname -i resolves to the correct IP version, that is used as the public IP (as before.) Otherwise, the first valid ip in hostname -I is used. This will prevent a dual stack container from erroring out if IPv6 is desired, as hostname -i seems to prefer the v4 address to the v6 if both are present.

Otherwise, an error is thrown that no valid IP could be found.

Enhanced FDB_COORDINATOR ip resolution

Issue

FDB Coordinator discovery always looks up IPv4 addresses, as dig by default searches for A records. It also doesn't respect the local /etc/hosts file.

New Behavior

Based on the value of FDB_IP_VERSION, fdb coordinator ip is discovered with either getent ahostsv4 or getent ahostsv6. This will prefer the local hosts file if it has the name, otherwise it will try to reach a remote DNS server.

@edameki
edameki marked this pull request as draft August 10, 2026 22:15
Elly Dameki added 4 commits August 12, 2026 15:31
@edameki
edameki force-pushed the fdb.bash-ipv6-support branch from f6f5c72 to 655f88c Compare August 12, 2026 19:35
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.

1 participant