ivandika3 commented on code in PR #10598:
URL: https://github.com/apache/ozone/pull/10598#discussion_r3654759640
##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterImpl.java:
##########
@@ -698,14 +771,32 @@ protected List<HddsDatanodeService> createHddsDatanodes()
for (int i = 0; i < numOfDatanodes; i++) {
OzoneConfiguration dnConf = dnFactory.apply(conf);
+ if (hosts != null) {
+ dnConf.set(HddsConfigKeys.HDDS_DATANODE_HOST_NAME_KEY, hosts[i]);
+ }
+ // Bypass InetAddress.getName() resolution for custom hostnames by
starting DN via YAML.
+ confDatanodeViaYaml(dnConf);
Review Comment:
> This can prevent the Datanode from successfully connecting to and
registering with SCM, which in turn causes
MiniOzoneCluster.waitForClusterToBeReady to time out
This seems to be a latent bug waiting to be triggered. Could you raise a
ticket for this? If we know that the datanode is not going to be registered to
the SCM, we should not let it start at all (we can simply throw the exception
and let the DN crash before starting). Otherwise, we will have a situation
where the datanode looks online, but it is not registered which is very hard to
debug. cc: @ptlrs
How about we just set `setHostname` to 127.0.0.1 or `DNS.getDefaultHost`?
Will it work?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]