rjgoyln commented on code in PR #11272:
URL: https://github.com/apache/ozone/pull/11272#discussion_r4229637141


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java:
##########
@@ -893,6 +895,7 @@ public static Collection<HostAndPort> 
getSCMAddressForDatanodes(ConfigurationSou
 
       final Collection<HostAndPort> addresses = new HashSet<>(names.size());
       for (String address : names) {
+        validateAdvertisedAddress(OZONE_SCM_NAMES, address);

Review Comment:
   Thanks, I had missed that ConfigurationException does not extend 
IllegalArgumentException. Fixed in e037cba6c9: both lookups are now inside the 
guard, with tests covering invalid SCM and Recon addresses ending in SHUTDOWN.



##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMNodeInfo.java:
##########
@@ -96,6 +96,7 @@ public static List<SCMNodeInfo> 
buildNodeInfo(ConfigurationSource conf) {
         if (scmAddress == null) {
           throw new ConfigurationException(addressKey + "is not defined");
         }
+        HddsUtils.validateAdvertisedHost(addressKey, scmAddress);

Review Comment:
   Good catch — non-secure SCM only loads its own address through 
loadSCMHAConfig(), so I added validation there in a52223dde8 with rejection 
tests. Recon had the same gap, so 58b4085d89 adds validation in 
ReconServer.call().



-- 
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]

Reply via email to