Skip to content

fix(runtime): prefer the routed source address in automatic host selection - #15628

Merged
biswapanda merged 5 commits into
ai-dynamo:mainfrom
nvpohanh:pohanh/prefer-routed-local-ip
Oct 6, 2026
Merged

biswapanda merged 5 commits into
ai-dynamo:mainfrom
nvpohanh:pohanh/prefer-routed-local-ip

Conversation

@nvpohanh

@nvpohanh nvpohanh commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

[by Claude Code]

Summary

Since #13126, automatic host selection (for DYN_TCP_RPC_HOST, DYN_TCP_RESPONSE_STREAM_HOST and DYN_EVENT_PLANE_HOST when unset, and for wildcard hosts) takes the first usable address of any up interface in operating-system enumeration order. Before #13126 it used local_ip()/local_ipv6(), which on Linux return the preferred source address of the kernel's route to an external address.

On hosts where a node-local interface enumerates before the cluster interface, the new behavior binds and advertises an address that other nodes cannot reach. We hit this on GB300 nodes whose BMC Redfish host interface (bmc_redfish0, which carries the same node-local 10.0.1.2 on every node) is listed first. Every prefill and decode worker advertised 10.0.1.2, so the frontend failed with TCP connection to 10.0.1.2:<port> failed / no endpoints available to route work for every worker on another node. The same nodes work with an older Dynamo build (1.5.0.dev20260914, before #13126), which binds the cluster address.

This change restores the routing-table preference while keeping #13126's guarantees:

  • local_candidates() first asks local_ip() and local_ipv6() for the routed source address in each family and seeds the candidates with it only if an up interface in the same snapshot carries that address. It then considers the snapshot in enumeration order as before.
  • Failed probes are ignored, so IPv6-only hosts, hosts without a route, and stub resolvers that return errors behave exactly as before.
  • Explicit hosts, IP literals and named interfaces are unchanged. Wildcard advertisement and resolve_advertise_ip_for_bind() also benefit, because they share local_candidates().
  • The runtime-configuration reference now describes the preference.

local_ip() on Linux (local-ip-address 0.6.13) sends one RTM_GETROUTE netlink request for 192.0.2.0 (IPv6: 2001:db8::) and reads RTA_PREFSRC; on other Unix platforms it returns the first non-loopback IPv4 interface address, which matches the existing enumeration order.

Validation

  • cargo test --locked -p dynamo-runtime --lib -- utils::ip_resolver pipeline::network::tcp::server transports::event_plane system_status_server: 128 passed, including two new resolver tests:
    • routed_address_is_preferred_over_earlier_interfaces: a BMC-style interface enumerated first; checks automatic selection, the IPv4 wildcard, resolve_advertise_ip_for_bind() for 0.0.0.0 and ::, and that explicit interface lookup still returns the BMC address.
    • routed_address_outside_up_snapshot_is_ignored: routed addresses on a down interface or absent from the snapshot are ignored.
    • ipv6_only_inventory_uses_global_ipv6_without_family_probes became ..._when_family_probes_fail: failed probes do not change the IPv6-only result. The exact probe call-count assertions and the unused StubResolver probe counters were removed in review.
  • cargo clippy --locked --no-deps -p dynamo-runtime --all-targets -- -D warnings passed.
  • cargo fmt -p dynamo-runtime -- --check and git diff --check passed.
  • python3 docs/fern/scripts/docs_lint.py: 0 errors.

🤖 Generated with Claude Code

…ction

Automatic host selection for the TCP request plane, response stream and
direct ZMQ event plane takes the first usable address of any up interface
in enumeration order. Hosts with a node-local interface that enumerates
before the cluster interface, such as a BMC Redfish host interface, then
bind and advertise an address other nodes cannot reach.

Before ai-dynamo#13126, selection used local_ip()/local_ipv6(), which on Linux return
the preferred source address of the route to an external address. Restore
that preference while keeping ai-dynamo#13126's single up-interface snapshot and
IPv6-only support: seed the candidates with the routed IPv4 and IPv6
addresses when an up interface in the snapshot carries them, then fall back
to enumeration order. Failed probes are ignored, so IPv6-only hosts and
hosts without a route behave as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Po-Han Huang <pohanh@nvidia.com>
@nvpohanh
nvpohanh requested review from a team as code owners October 5, 2026 04:03
@copy-pr-bot

copy-pr-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nvpohanh
nvpohanh deployed to external_collaborator October 5, 2026 04:03 — with GitHub Actions Active
@nvpohanh
nvpohanh deployed to external_collaborator October 5, 2026 04:03 — with GitHub Actions Active
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot added fix external-contribution Pull request is from an external contributor documentation Improvements or additions to documentation labels Oct 5, 2026
@coderabbitai

coderabbitai Bot commented Oct 5, 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: a85402a4-5e48-4e27-8a5a-ae976b7f46e2
📥 Commits

Reviewing files that changed from the base of the PR and between 519e735 and 353d94f.

📒 Files selected for processing (2)
  • docs/fern/pages/reference/components/runtime-configuration.mdx
  • lib/runtime/src/utils/ip_resolver.rs

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


Walkthrough

Automatic local address selection now prefers routed IPv4 and IPv6 addresses when they appear on an up interface. The runtime configuration reference documents this preference for DYN_TCP_RPC_HOST and DYN_EVENT_PLANE_HOST.

Changes

Routed address selection

Layer / File(s) Summary
Select and document routed addresses
lib/runtime/src/utils/ip_resolver.rs, docs/fern/pages/reference/components/runtime-configuration.mdx
The resolver probes routed addresses and prioritizes results present in the up-interface snapshot. Interface enumeration remains the fallback. Tests cover successful probes, failed probes, wildcard advertisement, named-interface selection, and routed addresses absent from the snapshot. The reference describes the automatic selection preference.

Priority: ➖ Normal

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

Merge Risk: ⚪ Minimal · up to 353d9

The change appears mergeable after normal checks; no actionable issue was identified in the supplied changes.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 1 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the problem, proposed changes, affected behavior, and validation results. It omits the required Related Issues section and does not state whether this PR links to an issue. Add the required Related Issues section. Either list the related issue using the required format or confirm that no related issue exists.
✅ 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: preferring the routed source address during automatic host selection.
Full details: Docstring Coverage

Explanation

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

  • Fix all pre-merge checks with AI
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Comment thread lib/runtime/src/utils/ip_resolver.rs Outdated
…solver test

The IPv6-only test checks the selected address; the exact number of family
probes is an implementation detail. Remove the assertions and the now-unused
StubResolver probe counters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Po-Han Huang <pohanh@nvidia.com>
@nvpohanh
nvpohanh deployed to external_collaborator October 5, 2026 05:04 — with GitHub Actions Active
Comment thread lib/runtime/src/utils/ip_resolver.rs Outdated
…ss test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Po-Han Huang <pohanh@nvidia.com>
@nvpohanh
nvpohanh deployed to external_collaborator October 5, 2026 05:23 — with GitHub Actions Active
@jthomson04

Copy link
Copy Markdown
Contributor

/ok to test bb745db

@devin-ai-integration

devin-ai-integration Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

⏹️ Dynamo PR CI cancelled — run 37400200087 (attempt 1) on 9a5dafed46

Gate checks: ✅ backend-status-check · ✅ deploy-status-check · ❌ dynamo-status-check

Other Jobs
dynamo-runtime ⏹️ 1

Failure details

No jobs failed. 1 job was cancelled: dynamo-runtime / image / Build multi-arch cuda13.0 ran past the 1h job time limit during Build and Push Test Image (GitHub annotation: "The job has exceeded the maximum execution time of 1h0m0s"). Nothing failed before it, so this isn't a fail-fast cancel, and no one cancelled it by hand. dynamo-status-check is red only because of this job. Rerunning failed jobs is likely enough.

For agents
{"pr": 15628, "run_id": 37400200087, "run_attempt": 1, "head_sha": "9a5dafed46f70a1b6b7ed1a4301944e397113b8f", "failures": [], "cancelled": [{"job": "dynamo-runtime / image / Build multi-arch cuda13.0", "job_id": 112065537018, "step": "Build and Push Test Image", "reason": "The job has exceeded the maximum execution time of 1h0m0s", "log_cmd": "gh run view --job 112065537018 -R ai-dynamo/dynamo --log"}]}

Posted automatically by Devin for run 37400200087. Updated on every full-CI run of this PR.

@jthomson04
jthomson04 enabled auto-merge (squash) October 5, 2026 20:36

@biswapanda biswapanda 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.

lgtm

@biswapanda
biswapanda deployed to external_collaborator October 5, 2026 22:59 — with GitHub Actions Active
@biswapanda
biswapanda disabled auto-merge October 5, 2026 23:00
@biswapanda
biswapanda enabled auto-merge (squash) October 5, 2026 23:00
Comment thread lib/runtime/src/utils/ip_resolver.rs
Signed-off-by: Biswa Panda <biswa.panda@gmail.com>
@biswapanda
biswapanda requested a review from a team as a code owner October 6, 2026 00:07
@biswapanda
biswapanda deployed to external_collaborator October 6, 2026 00:08 — with GitHub Actions Active
@biswapanda
biswapanda disabled auto-merge October 6, 2026 01:38
@biswapanda

Copy link
Copy Markdown
Contributor

/ok to test 9a5dafe

@biswapanda
biswapanda enabled auto-merge (squash) October 6, 2026 01:38

@dynamo-review-agent dynamo-review-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Previously reported defects still present:

  • Original discussion: The previously raised redundant parameter case is still present: routed_address_outside_up_snapshot_is_ignored still iterates over both "198.51.100.1" and "192.0.2.99". After stale0 is filtered from the up snapshot, the 198.51.100.1 case observes the same absent-routed-address behavior as the retained 192.0.2.99 case, while down-interface filtering remains protected by automatic_selection_excludes_down_interfaces_but_explicit_lookup_keeps_them.
  • Original discussion: The previously reported redundant "198.51.100.1" parameter case is still present in routed_address_outside_up_snapshot_is_ignored; the retained "192.0.2.99" case exercises the same absent-from-up-snapshot path while the existing down-interface test covers filtering.

@biswapanda
biswapanda merged commit ee07d6b into ai-dynamo:main Oct 6, 2026
186 of 188 checks passed
richardhuo-nv added a commit to SemiAnalysisAI/InferenceX that referenced this pull request Oct 7, 2026
…07 wheel

The nightly is built after ai-dynamo/dynamo#15628 (ee07d6b6, routed node
address selection), so it replaces the source-build pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cquil11 added a commit to SemiAnalysisAI/InferenceX that referenced this pull request Oct 12, 2026
…cs / glm5.2 gb300 trt agentx:rc28 + agent bounce + Dynamo --publish-metrics (#3707)

* feat(config): update GLM-5.2 GB300 TRT AgentX recipes

Update the image, Dynamo wheel, bounce-buffer settings, and metric publication
across all six existing points. Remove the redundant served-model-name patch.

更新 GLM-5.2 GB300 TRT AgentX 六个现有点的镜像、Dynamo wheel、bounce buffer
设置及指标发布方式,删除重复的 served-model-name 补丁。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Cameron Quilici <60715037+cquil11@users.noreply.github.com>

* fix: pin GLM-5.2 GB300 Dynamo routed address selection

修复:固定 GLM-5.2 GB300 Dynamo 版本以选择可路由的节点地址。

* glm5.2 gb300 trt agentx: move Dynamo to the ai-dynamo 1.6.0.dev20261007 wheel

The nightly is built after ai-dynamo/dynamo#15628 (ee07d6b6, routed node
address selection), so it replaces the source-build pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(config): align GLM-5.2 KV offload backend version with rc28

将 GLM-5.2 GB300 的六个 KV 卸载后端版本标签更新为 rc28,与服务镜像版本保持一致。

* chore(config): bump GLM-5.2 GB300 TRT AgentX Dynamo wheel to 1.6.0.dev20261009

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(config): bump GLM-5.2 GB300 TRT AgentX Dynamo wheel to 1.6.0.dev20261010

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Rohit Pujar Nagraj <rpujarnagraj@nvidia.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cameron Quilici <60715037+cquil11@users.noreply.github.com>
Co-authored-by: cquil11 <cjquilici@gmail.com>

This branch was successfully deployed

1 active deployment
external_collaborator — 9a5dafed Deployed Oct 6, 2026 by biswapanda via ok-to-test #26651
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 external-contribution Pull request is from an external contributor fix size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants