Skip to content

Conversation

@biswapanda
Copy link
Contributor

@biswapanda biswapanda commented Jul 25, 2025

Overview:

fix: use ip_address instead of hostname for nixl sidechannel

Details:

Where should the reviewer start?

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

Summary by CodeRabbit

  • Bug Fixes
    • Improved network consistency by using IP addresses instead of hostnames for port reservation and side channel configuration.
    • Enhanced reliability by verifying IP address usability and falling back to localhost if necessary.
    • Updated logging to reflect the use of IP addresses.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 25, 2025

Walkthrough

The update changes how node identification is handled for port reservation and side channel configuration. Hostnames are now resolved to IP addresses using socket operations, and these IPs are used throughout the logic, including environment variable settings and logging. The function signature for side channel setup is also simplified.

Changes

File(s) Change Summary
components/backends/vllm/src/dynamo/vllm/args.py Replaced hostname usage with IP address resolution for port reservation and side channel setup. Updated function signature for side channel configuration, removed optional hostname parameter, and revised logging to reflect IP usage.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Poem

A hop, a skip, from host to IP,
Connections clearer, as they should be.
No more guessing names in the sky,
Just numbers now, as packets fly.
With sockets bound and logs anew,
This bunny cheers—networking's true! 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ff92053 and fadf74b.

📒 Files selected for processing (1)
  • components/backends/vllm/src/dynamo/vllm/args.py (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build and Test - vllm
  • GitHub Check: pre-merge-rust (lib/runtime/examples)
  • GitHub Check: pre-merge-rust (.)
  • GitHub Check: pre-merge-rust (lib/bindings/python)
🔇 Additional comments (2)
components/backends/vllm/src/dynamo/vllm/args.py (2)

140-140: LGTM: Consistent use of IP address in ETCD key.

The change from hostname to IP address in the ETCD key is consistent with the PR objective and improves reliability in multi-node deployments.


242-242: Function signature usage verified—no issues found

A search for all calls to set_side_channel_host_and_port shows only the one invocation in components/backends/vllm/src/dynamo/vllm/args.py, and it already uses the new single-parameter signature. No callers remain with the old two-parameter form, so this change is safe to merge.

@biswapanda
Copy link
Contributor Author

/ok to test d608ed2

logger.warning(
f"Hostname '{node_name}' cannot be resolved, falling back to '127.0.0.1'"
)
node_ip = "127.0.0.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can can 127.0.0.1 be set as a const? and all of its references refer to the const?

Copy link

Choose a reason for hiding this comment

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

Why are we setting to localhost ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

localhost ~ this was the default value used by vllm but its not right for multi-node / k8s setup

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll rather throw an error because 127.0.0.1 will not work in k8s anyway

Copy link
Contributor

Choose a reason for hiding this comment

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

I think throwing error makes sense in this case, because if the code path reaches this point, IIUC, the node is not discoverable (/ reachable) from other nodes within the network, which should be a fatal failure for the deployment and the user should resolve that before deploying dynamo.

I think we should add option for user to provide IP explicitly to bypass the IP discovery code here, for the cases where the user is well-aware of their node orchestration and the IP is not trivially discoverable by our code above.

Copy link

Choose a reason for hiding this comment

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

What's the behavior of gethostbyname in Kubernetes? Will it give us the routable hostname?

An alternative is that on Kubernetes we use the injected variables to set the hostname/IP of the pod/etc.

Copy link
Contributor Author

@biswapanda biswapanda Jul 25, 2025

Choose a reason for hiding this comment

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

yes, socket.gethostbyname gives a routable IP in k8s.

it was a quick solution to get to functional state/unblock Hannah's perf sweep today.
I'll update to use explicit IP address set as env var set from k8s layer.

@biswapanda biswapanda changed the title fix: use ip_address instead of hostname for nixl sidechannel fix: vllm disagg hang - ip address based nixl sidechannel Jul 26, 2025
@biswapanda biswapanda closed this Jul 28, 2025
@biswapanda
Copy link
Contributor Author

accidentally closed this PR - reopening after a rebase on top of main.

@biswapanda
Copy link
Contributor Author

Another PR #2135 for planner was rebased on top of this and its merged to main now.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants