Add ipv6 support to docker container - #13829
Draft
edameki wants to merge 4 commits into
Draft
Conversation
edameki
marked this pull request as draft
August 10, 2026 22:15
added 4 commits
August 12, 2026 15:31
Public IP is the first IP in `hostname -I` of the correct version, unless `hostname -i` resolves to the correct IP version.
…lves to multiple IPs
edameki
force-pushed
the
fdb.bash-ipv6-support
branch
from
August 12, 2026 19:35
f6f5c72 to
655f88c
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added functionality for
fdb.bashto support ipv6, provided the new env variableFDB_IP_VERSIONis 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.bashwould throw an error ifhostname -iresolved to a v6 address, as it would not be encased in brackets.New Behavior
Depending on the value of
FDB_IP_VERSION,fdb.bashwill try and find the machine's v4 or v6 address. IPv4 is the default pick.If
hostname -iresolves to the correct IP version, that is used as the public IP (as before.) Otherwise, the first valid ip inhostname -Iis used. This will prevent a dual stack container from erroring out if IPv6 is desired, ashostname -iseems 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
digby default searches for A records. It also doesn't respect the local/etc/hostsfile.New Behavior
Based on the value of
FDB_IP_VERSION, fdb coordinator ip is discovered with eithergetent ahostsv4orgetent ahostsv6. This will prefer the local hosts file if it has the name, otherwise it will try to reach a remote DNS server.