[ 
https://issues.apache.org/jira/browse/HDDS-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17058543#comment-17058543
 ] 

runzhiwang edited comment on HDDS-1933 at 3/13/20, 9:18 AM:
------------------------------------------------------------

I change getIpAddress at the following links to getHostName, it works fine.
1. 
https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientGrpc.java#L173.
 
2. 
https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/RatisHelper.java#L93.
 (pointed by [~adoroszlai])

But I'm not sure which of the following two fixes is better:  1. replace the 
two fileds  ipAddress and hostName in DatanodeDetails with only one field 
dnsName: dnsName = if (dfs.datanode.use.datanode.hostname) hostName else 
ipAddress, this fix is thorough but has to change a lot of code and has a high 
risk; 2. pass the parameter dfs.datanode.use.datanode.hostname to methods which 
need to difference between hostName and ipAddress, this fix is simple but if 
someone forget to do this in the case need to difference between hostName and 
ipAddress, it will introduce a bug. So what do you think ? 
[~Sammi][~xyao][~adoroszlai][~swagle][~msingh]


was (Author: yjxxtd):
I change getIpAddress at the following links to getHostName, it works fine.
1. 
https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientGrpc.java#L173.
 
2. 
https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/RatisHelper.java#L93.
 (pointed by [~adoroszlai])

But I'm not sure which of the following two fixes is better:  1. replace the 
two fileds  ipAddress and hostName in DatanodeDetails with only one field 
dnsName: dnsName = if (dfs.datanode.use.datanode.hostname) hostName else 
ipAddress, this fix is thorough but has to change a lot of code and has a high 
risk; 2. pass the parameter dfs.datanode.use.datanode.hostname to methods which 
need to difference between hostName and ipAddress, this fix is simple but if 
someone forget to do this in the case need to difference between hostName and 
ipAddress, it will produce a bug. So what do you think ? 
[~Sammi][~xyao][~adoroszlai][~swagle][~msingh]

> Datanode should use hostname in place of ip addresses to allow DN's to work 
> when ipaddress change
> -------------------------------------------------------------------------------------------------
>
>                 Key: HDDS-1933
>                 URL: https://issues.apache.org/jira/browse/HDDS-1933
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Datanode, SCM
>    Affects Versions: 0.4.0
>            Reporter: Mukul Kumar Singh
>            Priority: Blocker
>
> This was noticed by [~elek] while deploying Ozone on Kubernetes based 
> environment.
> When the datanode ip address change on restart, the Datanode details cease to 
> be correct for the datanode. and this prevents the cluster from functioning 
> after a restart.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to