[
https://issues.apache.org/jira/browse/HDFS-11935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Anu Engineer updated HDFS-11935:
--------------------------------
Resolution: Fixed
Hadoop Flags: Reviewed
Fix Version/s: HDFS-7240
Status: Resolved (was: Patch Available)
[~surendrasingh] Thank you for the comments. [~linyiqun] Thank you for the
contribution. I have committed this to the feature branch.
> Ozone: TestStorageContainerManager#testRpcPermission fails when ipv6 address
> used
> ---------------------------------------------------------------------------------
>
> Key: HDFS-11935
> URL: https://issues.apache.org/jira/browse/HDFS-11935
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: test
> Affects Versions: HDFS-7240
> Reporter: Yiqun Lin
> Assignee: Yiqun Lin
> Fix For: HDFS-7240
>
> Attachments: HDFS-11935-HDFS-7240.001.patch,
> HDFS-11935-HDFS-7240.002.patch
>
>
> {{TestStorageContainerManager#testRpcPermission}} ran failed when ipv6
> address used in my local. The stack infos:
> {noformat}
> java.lang.IllegalArgumentException: Does not contain a valid host:port
> authority: 0:0:0:0:0:0:0:0:54846:9863
> at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:213)
> at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:164)
> at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:153)
> at
> org.apache.hadoop.ozone.OzoneClientUtils.getScmAddressForBlockClients(OzoneClientUtils.java:193)
> at
> org.apache.hadoop.ozone.ksm.KeySpaceManager.getScmBlockClient(KeySpaceManager.java:117)
> at
> org.apache.hadoop.ozone.ksm.KeySpaceManager.<init>(KeySpaceManager.java:100)
> at
> org.apache.hadoop.ozone.MiniOzoneCluster$Builder.build(MiniOzoneCluster.java:373)
> at
> org.apache.hadoop.ozone.TestStorageContainerManager.testRpcPermissionWithConf(TestStorageContainerManager.java:95)
> at
> org.apache.hadoop.ozone.TestStorageContainerManager.testRpcPermission(TestStorageContainerManager.java:79)
> {noformat}
> {{OzoneClientUtils#getHostName}} will return a invalid host name when input
> value is a ipv6 address.
> The root cause of this is that we use {{ListenerAddress}} which can be the
> Iner6Address or Iner4Address instance}} to update address in
> {{OzoneClientUtils#updateListenAddress}}.
> {code}
> public static InetSocketAddress updateListenAddress(
> OzoneConfiguration conf, String rpcAddressKey,
> InetSocketAddress addr, RPC.Server rpcServer) {
> InetSocketAddress listenAddr = rpcServer.getListenerAddress();
> InetSocketAddress updatedAddr = new InetSocketAddress(
> addr.getHostString(), listenAddr.getPort());
> conf.set(rpcAddressKey,
> listenAddr.getHostString() + ":" + listenAddr.getPort());
> return updatedAddr;
> }
> {code}
> We can use {{addr.getHostString() + ":" + listenAddr.getPort()}} to replace
> {{listenAddr.getHostString() + ":" + listenAddr.getPort()}}. This way should
> be okay since we just use configured address to start rpc server and the host
> name should be same.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]