Skip to content

fix(runtime): support IPv6 ZMQ event paths - #15324

Merged
jthomson04 merged 1 commit into
mainfrom
jthomson04/ipv6-zmq-events
Sep 29, 2026
Merged

jthomson04 merged 1 commit into
mainfrom
jthomson04/ipv6-zmq-events

Conversation

@jthomson04

@jthomson04 jthomson04 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

After #13126, direct ZMQ event publishers still selected and bound IPv4. On the IPv6-only pod network reported in #7619, they could advertise IPv4 loopback, or advertise an explicit IPv6 address without an IPv6 listener.

Reuse the existing resolver to prefer non-loopback IPv4, then IPv6. Bind the matching wildcard and advertise the port assigned to that socket. Enable IPv6 in the shared event-plane PUB/SUB builders, including broker connections. Keep existing host override validation and document the behavior.

Changes are limited to the two runtime event-plane modules and their configuration reference. Backend event ingestion, replay, and local IPv4 connections remain outside this fix. The 1.5.1 backport follows after this PR merges.

Validation

  • 48 event-plane tests passed, including real IPv4/IPv6 delivery through discovery and dynamic subscriber add/remove operations.
  • 15 resolver tests and 44 TCP server tests passed. All focused tests ran serially; no IPv6 cases were skipped.
  • cargo clippy -p dynamo-runtime --all-targets -- -D warnings, cargo fmt --all -- --check, and git diff --check passed.
  • Docs lint passed with zero errors. fern check --warnings passed after generating the ignored API references; it reports three unrelated warnings, including the authenticated redirect check being skipped.
  • fern docs broken-links reports one existing broken link in docs/fern/pages/recipes/model-recipes/deepseek-v4-pro-0813.mdx:254, unchanged from the base commit.
  • Deployment validation pending: Kubernetes authentication works, but the available cluster has only IPv4 pod CIDRs and pod IPs. The two-pod vLLM reproduction has not run. Use examples/backends/vllm/deploy/agg.yaml with Qwen/Qwen3-0.6B, an image built from this branch, IPv6 HTTP/health listeners, and KV events enabled. Confirm worker health, /v1/models, a completion, and applied KV events in the frontend router before claiming the full reported deployment is fixed.

Summary by CodeRabbit

  • New Features
    • Event-plane publishing and subscribing now support IPv6 as well as IPv4, including configured ZMQ brokers.
    • Automatic address selection can use IPv6 when IPv4 is unavailable, with loopback fallback when no usable network address is found.
    • Direct publishers advertise their selected address and listener port.

Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
@github-actions github-actions Bot added fix documentation Improvements or additions to documentation labels Sep 28, 2026
@jthomson04
jthomson04 marked this pull request as ready for review September 28, 2026 17:27
@jthomson04
jthomson04 requested review from a team as code owners September 28, 2026 17:27
@github-actions

Copy link
Copy Markdown
Contributor

@PeaBrane PeaBrane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: ai-dynamo/dynamo/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e3548fb2-10aa-4b08-8a65-32524f9aab21

📥 Commits

Reviewing files that changed from the base of the PR and between 494d6e2 and e17ab61.

📒 Files selected for processing (3)
  • docs/fern/pages/reference/components/runtime-configuration.mdx
  • lib/runtime/src/transports/event_plane/mod.rs
  • lib/runtime/src/transports/event_plane/zmq_transport.rs

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.


Walkthrough

Direct ZMQ publishers now select an advertised IPv4 or IPv6 address and bind to a wildcard endpoint for that address family. Publisher and subscriber sockets enable IPv6. Tests cover host selection, discovery, delivery, and dynamic publishers across IPv4 and IPv6.

Changes

Dual-stack event plane

Layer / File(s) Summary
Host selection and family-specific binding
lib/runtime/src/transports/event_plane/mod.rs, docs/fern/pages/reference/components/runtime-configuration.mdx
Automatic host selection uses the local advertised IP. Direct publishers bind to the matching IPv4 or IPv6 wildcard address. Tests cover address selection, configured IPv6 hosts, and fallback behavior. The documentation describes selection, fallback, and discovery behavior.
IPv6 sockets and publisher tests
lib/runtime/src/transports/event_plane/mod.rs, lib/runtime/src/transports/event_plane/zmq_transport.rs
Publisher and subscriber sockets enable IPv6. Integration tests cover discovery and delivery through IPv4 and IPv6 endpoints. Dynamic publisher tests cover inproc, IPv4 TCP, and IPv6 TCP.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to e17ab

No identified issue blocks merging. IPv6-only deployment validation remains pending.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 58.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 2 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description clearly explains the problem, implementation, scope, validation, and pending deployment validation. However, it omits the required Related Issues section and does not confirm whether t… Add the required Related Issues section. Either include the applicable issue reference, such as "Closes #7619" or "Relates to #7619", or select the confirmation that no related issue exists. Remove the unused alternative path.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: adding IPv6 support for ZMQ event paths.
Full details: Docstring Coverage

Explanation

Docstring coverage is 58.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 2 files. (1 skipped: 1 unsupported.)

Full details: Description check

Explanation

The description clearly explains the problem, implementation, scope, validation, and pending deployment validation. However, it omits the required Related Issues section and does not confirm whether the PR is linked to an issue.

  • Fix all pre-merge checks with AI

Comment @coderabbitai help to get the list of available commands.

@jthomson04

Copy link
Copy Markdown
Contributor Author

Review follow-up for e17ab61dd1b8: the changes below are implemented and tested locally. They are not committed or pushed yet, so they are not part of the current PR diff.

Concern Decision and local change
Broker hostname resolution and IPv4 listeners Enable IPv6 only for bracketed TCP endpoints. Apply the choice at each bind/connect, including later connections on the same socket. IPv4 addresses and hostnames retain IPv4 behavior.
IPv4 link-local or bridge address selection Defer the shared resolver policy change. Document DYN_EVENT_PLANE_HOST for hosts where automatic selection chooses an unreachable address.
IPv6 bind failures Add error context with the bind endpoint, advertised address, and host override setting. Keep the underlying error.
ResolvedHost return type and loopback fallback Add the fallback warning. Keep the IpAddr return and wildcard bind choice: ResolvedHost::bind_ip() can return a concrete address.
IPv6 wildcard exposure Document that the IPv6 wildcard can also accept IPv4 connections and that ZMQ listeners must use trusted networks.
Test resolver and naming Reuse StubResolver, remove the duplicate resolver, and rename the automatic-selection test.
Tests on hosts without IPv6 Check IPv6 loopback availability before IPv6 cases and report skips. ZMQ failures still fail the tests.
Relay documentation Correct the stale IPv4-only guidance and describe matching wildcard binding.

Keep this PR focused on event transport. Do not add docstrings solely to satisfy the bot's coverage target.

Local validation:

  • All 49 event-plane tests passed serially; no IPv6 cases were skipped. Coverage includes discovery delivery, broker hostname connections, and mixed IPv4/IPv6 subscriber add/remove operations in both orders. This host maps localhost only to IPv4, so the broker test also checks the socket option that controls DNS address-family selection.
  • Runtime Clippy with warnings denied, formatting, diff checks, and docs lint passed. Fern configuration checks passed with existing warnings. The link check reports one existing recipe link, in a file identical to the PR base.

The two-pod IPv6 Kubernetes reproduction remains pending. Local socket tests do not establish that the full reported deployment works. The 1.5.1 backport remains separate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation fix size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants