bshashikant commented on a change in pull request #1921:
URL: https://github.com/apache/ozone/pull/1921#discussion_r578974976



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java
##########
@@ -681,6 +688,60 @@ public static String buildRpcServerStartMessage(String 
description,
     return rpcServer;
   }
 
+  /**
+   * Routine to bootstrap the StorageContainerManager. Thsi will connect to a
+   * running SCM instance which has valid cluster id and fetch the cluster id
+   * from there. SCM ids will be also be exchanged here.
+   *
+   * TODO: once SCM HA security is enabled, CSR cerificates will be fetched 
from
+   * running scm leader instance as well.
+   *
+   * @param conf OzoneConfiguration
+   * @return true if SCM bootstrap is successful, false otherwise.
+   * @throws IOException if init fails due to I/O error
+   */
+  public static boolean scmBootstrap(OzoneConfiguration conf)
+      throws IOException {
+    if (!SCMHAUtils.isSCMHAEnabled(conf)) {
+      LOG.error("Bootstrap is not supported without SCM HA.");
+      return false;
+    }
+    // The node here will try to fetch the cluster id from any of existing
+    // running SCM instances.
+    // TODO: need to avoid failover to local SCM Node here
+    final ScmInfo scmInfo = HAUtils.getScmInfo(conf);

Review comment:
       Yes, it will work. I did not find anyway to do that in failOverProxy 
provider.




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