bharatviswa504 commented on a change in pull request #2000:
URL: https://github.com/apache/ozone/pull/2000#discussion_r600366956



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java
##########
@@ -793,7 +880,18 @@ public static boolean scmBootstrap(OzoneConfiguration conf)
         // SCM Node info containing hostname to scm Id mappings
         // will be persisted into the version file once this node gets added
         // to existing SCM ring post node regular start up.
+
+        if(OzoneSecurityUtil.isSecurityEnabled(conf)) {
+          HASecurityUtils.initializeSecurity(scmStorageConfig,
+              scmInfo.getScmId(), config, getScmAddress(scmhaNodeDetails, 
conf),
+              false);
+        }
+        scmStorageConfig.setPrimaryScmNodeId(scmInfo.getScmId());

Review comment:
       Primary SCM only starts Root CA that is the only one can issue scm sub 
ca certificates.
   
   But if you add later on, and the leader changes there will be no rootCA 
running on that SCM, so bootstrap won't be successful. Let me try to handle 
that.

##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java
##########
@@ -793,7 +880,18 @@ public static boolean scmBootstrap(OzoneConfiguration conf)
         // SCM Node info containing hostname to scm Id mappings
         // will be persisted into the version file once this node gets added
         // to existing SCM ring post node regular start up.
+
+        if(OzoneSecurityUtil.isSecurityEnabled(conf)) {
+          HASecurityUtils.initializeSecurity(scmStorageConfig,
+              scmInfo.getScmId(), config, getScmAddress(scmhaNodeDetails, 
conf),
+              false);
+        }
+        scmStorageConfig.setPrimaryScmNodeId(scmInfo.getScmId());

Review comment:
       Primary SCM only starts Root CA that is the only one can issue scm sub 
ca certificates.
   
   But if you add later on, and the leader changes there will be no rootCA 
running on that SCM, so bootstrap won't be successful. Let me try to handle 
that gracefully.




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

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