psy-ns opened a new pull request, #10885:
URL: https://github.com/apache/ozone/pull/10885
## What changes were proposed in this pull request?
Several Ozone CLI and insight commands parse host:port addresses from
configuration using naive string splitting (e.g. address.split(":", 2)). That
approach works for IPv4 and hostnames but breaks for IPv6 literals, which
contain multiple colons and must be written in bracketed form such as
[2001:db8::1]:9862.
This PR adds IPv6-aware address parsing helpers to HddsUtils and updates
affected call sites to use them.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15777
## How was this patch tested?
Added unit tests.
TestHddsUtils#testGetHostOnlyAndGetPort
TestBaseInsightSubCommand#testFallbackToIpv6RpcAddress — verifies that when
SCM/OM RPC addresses are configured as IPv6, getHost() produces correctly
bracketed HTTP URLs for SCM and OM insight endpoints.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]