Skip to content

fix: #7619 support IPv6-only environments with proper fallback - #7627

Closed
AsadShahid04 wants to merge 2 commits into
ai-dynamo:mainfrom
AsadShahid04:fix/7619-ipv6-fallback
Closed

AsadShahid04 wants to merge 2 commits into
ai-dynamo:mainfrom
AsadShahid04:fix/7619-ipv6-fallback

Conversation

@AsadShahid04

@AsadShahid04 AsadShahid04 commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes Dynamo startup failure in IPv6-only network environments by improving IPv4→IPv6 fallback error handling.

Problem

In IPv6-only environments, the local_ip_address crate can fail with a StrategyError during netlink deserialization ("ifa_prefixlen must be initialized") instead of the expected LocalIpAddressNotFound. The current error handling only caught LocalIpAddressNotFound, causing IPv6 fallback to never execute and service startup to fail.

Solution

  • Change IPv4 error handling to fall back to IPv6 on any error, not just LocalIpAddressNotFound
  • Apply fix in both tcp/server.rs and utils/ip_resolver.rs for consistency
  • Add test case for IPv6-only environment fallback scenario

Changes

  • lib/runtime/src/pipeline/network/tcp/server.rs: Updated error handling in TcpStreamServer::new_with_resolver
  • lib/runtime/src/utils/ip_resolver.rs: Updated error handling in resolve_local_ip_with_resolver
  • Added test: test_ipv6_only_environment_with_ipv4_strategy_error

Fixes

Fixes #7619

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Enhanced local IP address resolution to automatically fall back to IPv6 when IPv4 resolution encounters any error, improving support for IPv6-only network environments.
  • Tests

    • Added test coverage for IPv6-only network scenarios.

- Change IPv4 error handling to fall back to IPv6 on ANY error, not just LocalIpAddressNotFound
- This fixes StrategyError in IPv6-only environments where local_ip_address crate fails during netlink deserialization
- Apply fix in both tcp/server.rs and utils/ip_resolver.rs
- Add test case for IPv6-only environment fallback scenario

Fixes ai-dynamo#7619

Signed-off-by: Asad Shahid <[email protected]>
@AsadShahid04
AsadShahid04 requested a review from a team March 25, 2026 09:23
@copy-pr-bot

copy-pr-bot Bot commented Mar 25, 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.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi AsadShahid04! Thank you for contributing to ai-dynamo/dynamo.

Just a reminder: The NVIDIA Test Github Validation CI runs an essential subset of the testing framework to quickly catch errors.Your PR reviewers may elect to test the changes comprehensively before approving your changes.

🚀

@github-actions github-actions Bot added fix external-contribution Pull request is from an external contributor labels Mar 25, 2026
@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 12d31b17-cac6-4bfc-bacc-5e6b29c07b29

📥 Commits

Reviewing files that changed from the base of the PR and between 14a6122 and 959b00f.

📒 Files selected for processing (2)
  • lib/runtime/src/pipeline/network/tcp/server.rs
  • lib/runtime/src/utils/ip_resolver.rs

Walkthrough

The changes modify IP resolution logic to attempt IPv6 fallback on any IPv4 resolution error, not just LocalIpAddressNotFound. This enables functionality in IPv6-only environments where non-standard errors may occur during local IP detection.

Changes

Cohort / File(s) Summary
IP Resolution Error Handling
lib/runtime/src/pipeline/network/tcp/server.rs, lib/runtime/src/utils/ip_resolver.rs
Modified error handling for local IP resolution to unconditionally attempt IPv6 fallback on any resolver.local_ip() error, rather than only on LocalIpAddressNotFound. Added unit test validating IPv6-only environment behavior with proper URL bracketing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding IPv6-only environment support with proper fallback, directly addressing issue #7619.
Description check ✅ Passed The description covers all required template sections: overview, problem/solution details, specific file changes, and linked issue reference.
Linked Issues check ✅ Passed Changes fully address issue #7619 by broadening IPv4 error handling to trigger IPv6 fallback on any error, not just LocalIpAddressNotFound [#7619].
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing IPv6-only environment support: error handling updates in tcp/server.rs and ip_resolver.rs, plus related test coverage.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@rmccorm4

rmccorm4 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Hi @AsadShahid04, what's the relationship between #7632 and #7627 - does one supersede the other?

Also, can the testing (#7629) be wrapped up into a single PR along with the fix? Ideally there's only 1 PR to fix this instead of 3.

@AsadShahid04

Copy link
Copy Markdown
Contributor Author

@rmccorm4 — Thanks for the feedback. Let me clarify the relationship:

PR Scope & Relationships

#7627 (this PR) and #7632 cover the same core fix but with different scopes:

#7629 is a standalone test PR that validates the IPv6-only scenario in detail, but the fix already includes a basic test case (test_ipv6_only_environment_with_ipv4_strategy_error).

Consolidation Plan

I recommend closing #7632 (it's redundant) and merging this PR as-is. The test coverage is sufficient:

Summary

Would you prefer I consolidate #7629 into this PR, or is the current test coverage sufficient?

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions

Copy link
Copy Markdown
Contributor

This PR has been closed due to inactivity. If you believe this PR is still relevant, please feel free to reopen it with additional context or information.

@github-actions github-actions Bot closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contribution Pull request is from an external contributor fix size/M Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Dynamo fails in IPv6-only environments — "ifa_prefixlen must be initialized"

2 participants