[
https://issues.apache.org/jira/browse/HDDS-15895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chi-Hsuan Huang updated HDDS-15895:
-----------------------------------
Status: Patch Available (was: In Progress)
> Make ServerNotLeaderException suggested leader flow IPv6-safe
> -------------------------------------------------------------
>
> Key: HDDS-15895
> URL: https://issues.apache.org/jira/browse/HDDS-15895
> Project: Apache Ozone
> Issue Type: Task
> Reporter: Chi-Hsuan Huang
> Assignee: Chi-Hsuan Huang
> Priority: Major
> Labels: pull-request-available
>
> ServerNotLeaderException builds and parses its suggested\-leader address with
> IPv6\-unsafe code on both sides of the protocol:* Server side:
> ServerNotLeaderException.java:102 joins host and port with a plain colon
> \(suggestedLeader \+ ":" \+ port\). An IPv6 literal produces an ambiguous
> string such as 2001:db8::1:9872 that address parsers reject.
> * Client side: SUGGESTED\_LEADER\_PATTERN
> \(ServerNotLeaderException.java:34\-35\) is ._Suggested leader is
> Server:\(\[\^:\]_\)\(:\[0\-9\]\+\)._; \[\^:\]_ rejects colons, so an IPv6
> host never matches, bracketed or not.
> Because the client regex cannot match IPv6 in either form,
> getSuggestedLeader\(\) silently returns null in IPv6 deployments and the
> failover proxy falls back to round\-robin probing. Behavior stays
> functionally correct but the fast\-path leader hint is lost.
> Both sides must change together: bracket IPv6 literals when building the
> message \(reuse HddsUtils.getHostPortString from HDDS\-15768\) and extend the
> client pattern to accept a bracketed IPv6 authority. Add unit tests with IPv6
> leader addresses.
> Found while reviewing HDDS\-15773; excluded there because the server string
> and client regex have to change in the same patch.
> Parent epic: HDDS\-15763.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]