hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yiqun Lin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-11935) Ozone: TestStorageContainerManager#testRpcPermission fails when ipv6 address used
Date Tue, 06 Jun 2017 12:27:18 GMT

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

Yiqun Lin updated HDFS-11935:
-----------------------------
    Attachment:     (was: HDFS-11935-HDFS-724.001.patch)

> 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
>
>  {{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 {{updatedAddr.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.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message