[
https://issues.apache.org/jira/browse/HDDS-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-17136:
----------------------------------
Labels: pull-request-available (was: )
> Match user-supplied IPv6 datanode addresses regardless of their text form
> -------------------------------------------------------------------------
>
> Key: HDDS-17136
> URL: https://issues.apache.org/jira/browse/HDDS-17136
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Siyao Meng
> Priority: Major
> Labels: pull-request-available
>
> SCM records a datanode's IP address with {{InetAddress.getHostAddress()}}.
> For IPv6 the JDK returns the full form without zero compression, for example
> {{2001:db8:0:0:0:0:0:1}}. Several commands and services compare a
> user-supplied address with that stored string. An operator who types the
> usual compressed form {{2001:db8::1}} silently matches nothing.
> Affected comparisons:
> * {{ozone admin datanode list --ip}}: {{ListInfoSubcommand}} compares strings
> with {{compareToIgnoreCase}}.
> * Decommission status by IP:
> {{DecommissionUtils.getDecommissioningNodesList}}.
> * Container balancer include and exclude lists:
> {{ContainerBalancerClusterAnalyzer.shouldExcludeDatanode}}, and
> {{ContainerBalancer}} through {{SCMNodeManager.getNodesByAddress}}.
> * {{ozone admin datanode usageinfo --address}}: {{SCMClientProtocolServer}}
> -> {{SCMNodeManager.getNodesByAddress}}, an exact key lookup in
> {{dnsToDnIdMap}}.
> Not affected:
> * {{NodeDecommissionManager}} resolves the input with
> {{InetAddress.getByName}} before the lookup, so the forms match.
> * Internal callers that pass a JDK-formatted remote address, such as
> {{SCMBlockProtocolServer}} and {{KeyManagerImpl.getClientNode}}, produce the
> same full form.
> h3. Decision needed
> # Normalize at each comparison, for example with Guava
> {{InetAddresses.forString}} when both values are IP literals. Stored and
> displayed values stay unchanged.
> # Store the RFC 5952 compressed form ({{InetAddresses.toAddrString}})
> everywhere SCM and datanodes record an IP. This also improves display, but it
> changes persisted and published values and the keys used by internal callers.
> It needs a compatibility review.
> Option 1 is smaller and has no compatibility impact.
> Parent epic: HDDS-15763.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]