hanishakoneru commented on a change in pull request #2947:
URL: https://github.com/apache/ozone/pull/2947#discussion_r783290718



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java
##########
@@ -673,25 +708,19 @@ private void initOMHAConfig(int basePort) throws 
IOException {
           OMConfigKeys.OZONE_OM_NODES_KEY, omServiceId);
       List<String> omNodeIds = new ArrayList<>();
 
-      int port = basePort;
+      omPorts.reserve(numOfOMs);
+      ReservedPorts omRpcPorts = new ReservedPorts(1);
+      omRpcPorts.reserve(numOfOMs);

Review comment:
       Thanks @adoroszlai for the explanation. 
   IIUC, these reserved ports (not rpc ones) need to be released before the 
service's start() is called. If a service is started off as inactive, do we not 
need to release the ports before the service is made active (for example 
_startInactiveOM()_).
   But I ran the tests in TestAddRemoveOM and they are passing. Not sure what I 
am missing here.




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