JacksonYao287 commented on a change in pull request #2447:
URL: https://github.com/apache/ozone/pull/2447#discussion_r682542001



##########
File path: hadoop-ozone/dist/src/main/k8s/examples/ozone-ha/scm-statefulset.yaml
##########
@@ -52,6 +52,15 @@ spec:
         volumeMounts:
         - name: data
           mountPath: /data
+      - name: bootstrap
+        image: '@docker.image@'
+        args:
+        - ozone
+        - scm
+        - --bootstrap

Review comment:
       @ChenSammi the logic here is as follows.
   we want to create 3 scm replicas  in this yaml file. for each scm instance, 
two init containers will be executed first, and then the container will be 
started. it seem like we have 3 individual scm , and for each scm, we do `ozone 
scm --init`, `ozone scm --bootstrap` and `ozone scm` sequentially one by one. 
   
   so for the first(primordial) scm, `ozone scm --init` succeeds , and  the 
next `ozone scm --bootstrap` will fail with the message (SCM bootstrap command 
can only be executed in non-Primordial SCM), then it is started by `ozone scm` 
as a primordial scm.
   
   for the second and third scm, `ozone scm --init` will fail with the 
message(SCM init command can only be executed in Primordial SCM), and `ozone 
scm --bootstrap` will succeed, and then it is started by `ozone scm` as a 
non-primordial scm
   
   by this way , we got this scm HA cluster!
   
   i am not sure is it clear to you ? please let me know if the description is 
no clear, thanks




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