Repository navigation
HDDS-16831. Make remaining host and port concatenations IPv6-safe - #11462
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The endpoint changes consistently use the established helper and include focused regression coverage.
0 open findings
What changed in this PR
Makes endpoint construction IPv6-safe across OM gRPC, admin CLI, and Insight paths.
Changes:
- Uses
HddsUtils.getHostPortStringfor host/port formatting. - Preserves DNS/IPv4 output while bracketing IPv6 literals.
- Adds focused IPv6 regression tests.
| File | Description |
|---|---|
TestGrpcOmTransport.java |
Tests IPv6 OM gRPC initialization. |
TestBaseInsightSubCommand.java |
Tests datanode IPv6 URLs. |
BaseInsightSubCommand.java |
Safely formats datanode URLs. |
GrpcOMFailoverProxyProvider.java |
Safely formats OM gRPC addresses. |
TestReconfigureSubCommandUtil.java |
Tests IPv4, IPv6, and dead-node filtering. |
TestDiskBalancerSubCommandUtil.java |
Tests IPv6 RPC and display addresses. |
ReconfigureSubCommandUtil.java |
Safely formats batch reconfiguration addresses. |
DiskBalancerSubCommandUtil.java |
Safely formats RPC and displayed datanode addresses. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
|
jojochuang
approved these changes
Oct 12, 2026
Contributor
|
Merged. Thanks @smengcl @adoroszlai @rich7420 |
Contributor
Author
|
Thanks @rich7420 @jojochuang @adoroszlai for the reviews. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated-by: Claude Code (Opus 5.5)
What changes were proposed in this pull request?
Some code paths still build an endpoint with
host + ":" + port. With an IPv6 literal this gives an ambiguous value such as2001:db8::10:9862, which is rejected or parsed incorrectly.This patch uses
HddsUtils.getHostPortString(HDDS-15773) in:DiskBalancerSubCommandUtil: datanode RPC address and the address shown in status and report outputReconfigureSubCommandUtil: datanode address list for batch reconfigGrpcOMFailoverProxyProvider: OM gRPC addressBaseInsightSubCommand: datanode URL forozone insightDNS and IPv4 output is unchanged.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16831
How was this patch tested?
Added IPv6 cases to
TestDiskBalancerSubCommandUtil,TestBaseInsightSubCommandandTestGrpcOmTransport, and addedTestReconfigureSubCommandUtil. The new cases fail without the fix.🤖 Generated with Claude Code