Skip to content

[Feature] Support IPv6 binding in cloud/meta-service (doris_cloud) #66701

Description

@yackushevas

Search before asking

  • I had searched in the issues and found no similar issues.

Description

PR #14063 added IPv6 support to BE and FE, but the cloud component (doris_cloud / Meta Service) was not updated. The cloud component's network code in cloud/src/common/network_util.cpp is IPv4-only:

  1. CIDR class uses uint32_t (32-bit) and inet_aton (IPv4 only) — cannot parse IPv6 addresses
  2. InetAddress uses sockaddr_in (IPv4 only) — no sockaddr_in6 support
  3. get_hosts_v4() only collects AF_INET addresses — ignores AF_INET6
  4. BRPC server binds to 0.0.0.0 (IPv4) — no way to bind to [::] (IPv6)

Setting priority_networks with an IPv6 CIDR (e.g. ::/0 or fd00:b4c4::/32) causes a crash:
F... network_util.cpp:187] wrong cidr format. cidr_str=::/0

The fix is to port the IPv6 changes from be/src/util/cidr.cpp and be/src/service/backend_options.cpp (PR #14063) to the cloud component:

  1. Update CIDR class — use inet_pton with AF_INET6, std::array<uint8_t, 16> for address storage
  2. Update InetAddress — support sockaddr_in6 / sockaddr_storage
  3. Update get_hosts_v4 — also collect AF_INET6 addresses
  4. Update BRPC server initialization — bind to [::0] when priority_networks matches IPv6

Use case

Deploying Doris in storage-compute separation mode in IPv6-only environments. The Meta Service (doris_cloud) only binds to 0.0.0.0 (IPv4), making it unreachable via IPv6. Without IPv6 support, we have to use dual-stack networking (IPv4+IPv6) as a workaround, which is not always available.

Related issues

PR #14063Feature Support IPV6 (added IPv6 to BE and FE, but not cloud)

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions