hevinhsu commented on code in PR #10598:
URL: https://github.com/apache/ozone/pull/10598#discussion_r3663377666
##########
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 seems to be a latent bug waiting to be triggered. Could you raise a
ticket for this?
I did some more investigation into this.
When the configured hostname cannot be resolved,
[validateDatanodeIpAddress()](https://github.com/apache/ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java#L252)
catches the `UnknownHostException` and only logs it, leaving
`DatanodeDetails.ipAddress` as `null` while allowing the datanode to continue
startup.
During the subsequent communication with SCM, the datanode attempts to
construct a protobuf message from `DatanodeDetails`, but
`DatanodeDetails#getProtoBufMessage()` fails because the required `ipAddress`
field is missing, preventing the registration request from being sent to SCM.
The datanode remains in the `RUNNING` state, and subsequent registration
attempts continue to fail for the same reason. As a result, the datanode
remains running but cannot register with SCM, and
`MiniOzoneCluster.waitForClusterToBeReady()` eventually times out.
This seems to match the latent issue you mentioned, so I'll file a follow-up
ticket with the updated investigation results.
--
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]