Dian-Xuan Yang created HDDS-16307:
-------------------------------------
Summary: Construct listeners from separate host and port values
Key: HDDS-16307
URL: https://issues.apache.org/jira/browse/HDDS-16307
Project: Apache Ozone
Issue Type: Sub-task
Reporter: Dian-Xuan Yang
Assignee: Dian-Xuan Yang
**Sub-task of HDDS-15778**
### Problem
Setting any bind-host property to an IPv6 literal (e.g., `::`) currently
prevents the service from starting. The code builds the network authority using
plain string concatenation (`host + ":" + port`), which turns `::` and `9860`
into the ambiguous string `:::9860`. This causes `NetUtils.createSocketAddr` to
fail with a "valid host:port authority" exception.
### Solution
Use the bracket-aware helper `HddsUtils.getHostPortString` (introduced in
HDDS-15773) to correctly format IPv6 addresses (e.g., `[::]:9860`) before
parsing.
### Scope
Update the address construction methods in the following classes to use the new
helper:
* `HddsUtils` (Datanode client RPC)
* `HddsServerUtil` (SCM & Recon clients/datanode listeners)
* `ScmUtils` (SCM HA per-node equivalents)
* `BaseHttpServer` (All HTTP/HTTPS listeners: SCM, OM, Datanode, Recon, S3G,
Freon)
* `OmUtils` (OM RPC and Peer HTTP/HTTPS)
### Compatibility & Testing
* **Compatibility:** Existing IPv4 and DNS defaults remain completely
unchanged. No new configuration properties are added.
* **Testing:** Add unit tests to verify `InetSocketAddress` creation using `::`
and global IPv6 literals, while keeping existing IPv4 and DNS test cases.
* **Out of scope:** OS-specific behavior for which address families `::`
accepts will be handled in HDDS-15779.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]