Repository navigation
[feature](cloud) Support IPv6 binding in meta-service - #70572
Open
yackushevas wants to merge 1 commit into
Open
yackushevas wants to merge 1 commit into
yackushevas wants to merge 1 commit into
Conversation
yackushevas
requested review from
gavinchou,
liaoxin01 and
luwei16
as code owners
November 13, 2026 11:51
### Background doris_cloud networking is IPv4-only: inet_aton/uint32_t CIDR, sockaddr_in, AF_INET-only interface enumeration, and the brpc server binds 0.0.0.0. ### What problem does this PR solve? Issue Number: close apache#66701 Related PR: apache#14063 (IPv6 for BE/FE, cloud left out) PR Type: Feature Problem Summary: an IPv6 priority_networks (e.g. ::/0) crashes doris_cloud at startup, and even with a valid config the meta service cannot bind IPv6, forcing dual-stack in IPv6-only environments. Port the BE IPv6 implementation to cloud; IPv4 behavior unchanged. ### Details - **Scope:** doris_cloud only (meta service, recycler). - **Design:** CIDR, InetAddress and get_host_port are ported from be/src/util; get_local_ip() follows BE BackendOptions semantics (the CIDR family selects IPv4/IPv6); the brpc starter binds get_service_bind_address() via butil::str2endpoint, as BE does; registry endpoints bracket IPv6 literals. - **Usage:** priority_networks = fd00::/64 - **Default behavior:** unchanged for empty priority_networks (my_ip_cstr, 0.0.0.0). - **Compatibility:** loopback fallback stays 127.0.0.1 on dual-stack hosts; ::1 counts as loopback for enable_loopback_address_for_ms; the /0 mask is accepted (BE behavior). ### Testing - New GetLocalHostIPv6Test in cloud/test/network_util_test.cpp. - The modified network_util.cpp, compiled standalone, ran against live dual-stack interfaces (::1, fe80::, a real fd00::/64 ULA): 12/12 selection/bind/format cases and 8/8 CIDR edge cases pass; ::/0 no longer crashes. - run-cloud-ut.sh on a Linux stand: in progress (stand toolchain issues, unrelated to this change); CI validates. ### Notes for Reviewers A loopback address can now be selected directly by a CIDR (BE semantics; the returned string is unchanged, e.g. 127.0.0.1/8). str2endpoint("[::0]", port) is valid in brpc 1.4.0: ExtendedEndPoint::create parses the bracketed form before the IPv4-only str2ip path. ### Release note doris_cloud supports IPv6 priority_networks and binds [::0] when IPv6 is selected, enabling IPv6-only storage-compute deployments without dual-stack workarounds. ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: No (priority_networks semantics match the BE documentation). - Pre-submission status: Partially verified: standalone runtime checks passed; cloud UT running on a stand and in CI. ### AI Disclosure - Tool: OpenCode (GLM-5.3). - Generated: Code, tests and this description. - Human review: Diff reviewed by the author across multiple review passes.
yackushevas
force-pushed
the
feature/cloud-ipv6
branch
from
November 13, 2026 11:56
edb6ce1 to
59afb4b
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.
feature Support IPv6 binding in meta-service
Background
doris_cloud networking is IPv4-only: inet_aton/uint32_t CIDR, sockaddr_in, AF_INET-only interface enumeration, and the brpc server binds 0.0.0.0.
What problem does this PR solve?
Issue Number: close #66701
Related PR: #14063 (IPv6 for BE/FE, cloud left out)
PR Type: Feature
Problem Summary: an IPv6 priority_networks (e.g. ::/0) crashes doris_cloud at startup, and even with a valid config the meta service cannot bind IPv6, forcing dual-stack in IPv6-only environments. Port the BE IPv6 implementation to cloud; IPv4 behavior unchanged.
Details
Testing
Notes for Reviewers
A loopback address can now be selected directly by a CIDR (BE semantics; the returned string is unchanged, e.g. 127.0.0.1/8). str2endpoint("[::0]", port) is valid in brpc 1.4.0: ExtendedEndPoint::create parses the bracketed form before the IPv4-only str2ip path. In a mixed-version window, an old binary reading a new IPv6 registry entry dials "fd00::1:5000" (no brackets) and skips that best-effort peer refresh; non-fatal and self-healing after the rolling upgrade.
Release note
doris_cloud supports IPv6 priority_networks and binds [::0] when IPv6 is selected, enabling IPv6-only storage-compute deployments without dual-stack workarounds.
Check List (For Author)
AI Disclosure