You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/04/07 07:32:45 UTC

[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2113: HDDS-5027. [SCM HA Security] Handle leader changes during bootstrap.

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



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java
##########
@@ -89,11 +90,29 @@ private Object invokeRatis(Method method, Object[] args)
       throws Exception {
     long startTime = Time.monotonicNowNanos();
     Preconditions.checkNotNull(ratisHandler);
-    final SCMRatisResponse response =  ratisHandler.submitRequest(
-        SCMRatisRequest.of(requestType, method.getName(),
-            method.getParameterTypes(), args));
+    SCMRatisRequest scmRatisRequest = SCMRatisRequest.of(requestType,
+        method.getName(), method.getParameterTypes(), args);
+
+    // Scm Cert DB updates should use RaftClient.
+    // As rootCA which is primary SCM only can issues certificates to sub-CA.
+    // In case primary is not leader SCM, still sub-ca cert DB updates should go
+    // via ratis. So, in this special scenario we use RaftClient.
+    final SCMRatisResponse response;
+    if (method.getName().equals("storeValidCertificate") &&
+        args[args.length -1].equals(HddsProtos.NodeType.SCM)) {
+      response =

Review comment:
       this is needed only for scm signed certs, for others like om/dn we still need to go via normal route.
   This is the reason for this approach.
   
   




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org