rjgoyln opened a new pull request, #11130: URL: https://github.com/apache/ozone/pull/11130
## What changes were proposed in this pull request? A bind-host property set to an IPv6 literal — including the wildcard `::` — stops the service from starting. Ozone joins host and port by string concatenation before parsing the result, so `::` and port 9860 become `:::9860`, which has no unambiguous host, and `NetUtils.createSocketAddr` rejects it with "Does not contain a valid host:port authority". The listener is never bound. Every listener-construction site now combines through `HddsUtils.getHostPortString`, the bracket-aware helper added in HDDS-15768. That covers the SCM client, block, security and datanode endpoints and their SCM HA per-node equivalents, the datanode client RPC endpoint, the OM RPC and peer HTTP endpoints, and — through `BaseHttpServer.getBindAddress` — every HTTP and HTTPS listener in the project. Three sites undid that fix further along the same code path by re-serializing an address that had already been built correctly: the Jetty endpoint URI, and the two places that write a server's real listen address back into configuration once it has bound. An unbracketed authority written there is read back as a bare host with the port silently dropped, so the endpoint cannot be recovered from configuration either. These used Hadoop's `NetUtils.getHostPortString(InetSocketAddress)`, which does not bracket; a bracket-aware overload of the Ozone helper replaces it. IPv4 and DNS behaviour is unchanged, since a host is bracketed only when it contains a colon, and no configuration property or bind default changes. Advertised-address validation stays with the second sub-task of HDDS-15778, along with the four remaining call sites that render advertised peer identities. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16307 ## How was this patch tested? New and extended unit tests in `TestHddsUtils`, `TestHddsServerUtil`, `TestScmUtils`, `TestBaseHttpServer`, `TestServerUtils` and `TestOmUtils`, each confirmed to fail without the production change. The existing IPv4 and DNS assertions in those classes are kept, so the unchanged defaults stay covered. `updateConnectorAddress` has no dedicated test: asserting on it needs a server actually bound to `::`, whose accepted address families depend on the operating system's `IPV6_V6ONLY` handling. That qualification belongs with the IPv6 test environment in HDDS-15779. Generated-by: Claude Code (Opus 5) -- 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]
