pyttel commented on code in PR #10:
URL: https://github.com/apache/ozone-helm-charts/pull/10#discussion_r1832173815


##########
charts/ozone/templates/scm/scm-statefulset.yaml:
##########
@@ -61,6 +62,24 @@ spec:
               mountPath: {{ .Values.configuration.dir }}
             - name: {{ .Release.Name }}-scm
               mountPath: {{ .Values.scm.persistence.path }}
+        {{- if gt (int .Values.scm.replicas) 1 }}
+        - name: bootstrap
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | 
default .Chart.AppVersion }}"
+          args: ["ozone", "scm", "--bootstrap"]

Review Comment:
   > From the [SCM 
HA](https://ozone.apache.org/docs/current/feature/scm-ha.html) docs:
   >     
   >     The initialization of the first SCM-HA node is the same as a non-HA 
SCM:
   >     ozone scm --init
   >     Second and third nodes should be bootstrapped instead of init
   >     ozone scm --bootstrap
   >
   > Here, we call init and then bootstrap for every SCM pod (re)start.
   > We would instead have to perform pod-id specific actions.
   > 
   > It is not clear from the documentation whether init and bootstrap should 
only be performed once during the lifetime of the pod or upon every pod restart.
   
   I used the following doc:
   
   >  Auto-bootstrap
   > 
   > In some environments (e.g. Kubernetes) we need to have a common, unified 
way to initialize SCM HA quorum. As a reminder, the standard initialization 
flow is the following:
   > 
   >     On the first, “primordial” node: ozone scm --init
   >     On second/third nodes: ozone scm --bootstrap
   > 
   > This can be improved: primordial SCM can be configured by setting 
ozone.scm.primordial.node.id in the config to one of the nodes.
   > 
   > <property>
   >    <name>ozone.scm.primordial.node.id</name>
   >    <value>scm1</value>
   > </property>
   > 
   > With this configuration both scm --init and scm --bootstrap can be safely 
executed on all SCM nodes. Each node will only perform the action applicable to 
it based on the ozone.scm.primordial.node.id and its own node ID.
   > 
   > Note: SCM still needs to be started after the init/bootstrap process.
   > 
   > ozone scm --init
   > ozone scm --bootstrap
   > ozone scm --daemon start
   > 
   > For Docker/Kubernetes, use ozone scm to start it in the foreground.
   
   This can be found in the Auto-bootstrap section 
[here](https://ozone.apache.org/docs/current/feature/scm-ha.html). I understood 
that we can run this commands on every instance and it will automatically 
detect what to do if `ozone.scm.primordial.node.id` is set correctly



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