Unverified Commit 173e7d26 authored by Chung En Lee's avatar Chung En Lee Committed by GitHub
Browse files

HDDS-10508. OmUtils.getAllOMHAAddresses may throw NPE (#6884)

parent 950a4b55
Branches
No related merge requests found
Showing with 6 additions and 0 deletions
......@@ -855,6 +855,12 @@ public static List<OMNodeDetails> getAllOMHAAddresses(OzoneConfiguration conf,
try {
OMNodeDetails omNodeDetails = OMNodeDetails.getOMNodeDetailsFromConf(
conf, omServiceId, nodeId);
if (omNodeDetails == null) {
LOG.error(
"There is no OM configuration for node ID {} in ozone-site.xml.",
nodeId);
continue;
}
if (decommissionedNodeIds.contains(omNodeDetails.getNodeId())) {
omNodeDetails.setDecommissioningState();
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment