[ 
https://issues.apache.org/jira/browse/HDDS-15768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Doroszlai updated HDDS-15768:
------------------------------------
    Fix Version/s: 2.3.0
       Resolution: Fixed
           Status: Resolved  (was: Patch Available)

> Bracket IPv6 literals in Ratis peer addresses
> ---------------------------------------------
>
>                 Key: HDDS-15768
>                 URL: https://issues.apache.org/jira/browse/HDDS-15768
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Siyao Meng
>            Assignee: Siyao Meng
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.3.0
>
>
> Ozone builds Ratis peer address strings by plainly concatenating a host and
> port (`host + ":" + port`). When the host is an IPv6 literal (for example
> `2001:db8::1`), the result `2001:db8::1:9858` is ambiguous: it cannot be
> distinguished from a hostname, and neither Ratis nor gRPC can parse it. IPv6
> literals must be wrapped in square brackets when combined with a port, e.g.
> `[2001:db8::1]:9858`.
> This affects every Ratis transport in Ozone:
> - **Datanode pipelines** via `RatisHelper.toRaftPeerAddress` (used for the
>   `RATIS_SERVER`, `RATIS_ADMIN`, `RATIS`, and `RATIS_DATASTREAM` peer
>   addresses).
> - **OM HA** and **SCM HA** via `NodeDetails.getRatisHostPortStr`
>   (consumed by `OzoneManagerRatisServer`, `SCMRatisServerImpl`, and
>   `SCMHAManagerImpl` when calling `RaftPeer.setAddress(...)`).
> Ratis itself needs no change: `ratis-grpc` passes the peer address string
> verbatim to `NettyChannelBuilder.forTarget(...)`, which accepts the bracketed
> `[::1]:port` form, and Ratis's own 
> `NetUtils.createSocketAddr`/`address2String`
> are already IPv6-aware. The defect is purely that Ozone hands Ratis
> unbracketed IPv6 strings.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to