HDDS-421. Resilient DNS resolution in datanode-service. Contributed by Elek, Marton.
This commit is contained in:
parent
8fe4062bfc
commit
317f317d4b
@ -92,6 +92,16 @@ public class InitDatanodeState implements DatanodeState,
|
|||||||
LOG.error("Null or empty SCM address list found.");
|
LOG.error("Null or empty SCM address list found.");
|
||||||
return DatanodeStateMachine.DatanodeStates.SHUTDOWN;
|
return DatanodeStateMachine.DatanodeStates.SHUTDOWN;
|
||||||
} else {
|
} else {
|
||||||
|
for (InetSocketAddress addr : addresses) {
|
||||||
|
if (addr.isUnresolved()) {
|
||||||
|
LOG.warn("One SCM address ({}) can't (yet?) be resolved. Postpone "
|
||||||
|
+ "initialization.", addr);
|
||||||
|
|
||||||
|
//skip any further initialization. DatanodeStateMachine will try it
|
||||||
|
// again after the hb frequency
|
||||||
|
return this.context.getState();
|
||||||
|
}
|
||||||
|
}
|
||||||
for (InetSocketAddress addr : addresses) {
|
for (InetSocketAddress addr : addresses) {
|
||||||
connectionManager.addSCMServer(addr);
|
connectionManager.addSCMServer(addr);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user