You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "shuan1026 (via GitHub)" <gi...@apache.org> on 2026/07/18 12:14:19 UTC
[PR] HDDS-13828. Verify number of replicas for om and scm [ozone-helm-charts]
shuan1026 opened a new pull request, #45:
URL: https://github.com/apache/ozone-helm-charts/pull/45
## What changes were proposed in this pull request?
* Adds a Replicas section to `NOTES.txt` so `helm install` / `upgrade` prints the configured `om.replicas` and `scm.replicas`.
* Emits a WARNING when either count is even (Raft quorum is better with odd sizes), but does **not** fail the install.
* Even replica counts remain allowed for OM/SCM migration intermediate states (see Jira discussion and RATIS-2296). Odd counts such as 5 are valid and are not warned.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13828
## How was this patch tested?
* Green CI run
* Manual verification:
```bash
# NOTES are not shown by default with helm template; use dry-run
helm install ozone charts/ozone --dry-run --debug 2>&1 | tee /tmp/notes-default.txt
grep -nE 'Replicas|om.replicas|scm.replicas|WARNING' /tmp/notes-default.txt
# Even counts should show WARNING
helm install ozone charts/ozone --dry-run --set om.replicas=2 --set scm.replicas=4 2>&1 \
| grep -E 'WARNING|om.replicas|scm.replicas'
# Odd non-1/3 (e.g. 5) must not fail / must not warn as even
helm install ozone charts/ozone --dry-run --set om.replicas=5 --set scm.replicas=1 2>&1 \
| grep -E 'WARNING|om\.replicas\)|fail|Replicas'
--
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: issues-unsubscribe@ozone.apache.org
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
Re: [PR] HDDS-13828. Verify number of replicas for om and scm [ozone-helm-charts]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #45:
URL: https://github.com/apache/ozone-helm-charts/pull/45#issuecomment-5078566365
Thanks @shuan1026 for the patch, @chungen0126, @dnskr for the review.
--
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: issues-unsubscribe@ozone.apache.org
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
Re: [PR] HDDS-13828. Verify number of replicas for om and scm [ozone-helm-charts]
Posted by "dnskr (via GitHub)" <gi...@apache.org>.
dnskr commented on code in PR #45:
URL: https://github.com/apache/ozone-helm-charts/pull/45#discussion_r3610348806
##########
charts/ozone/templates/NOTES.txt:
##########
@@ -55,3 +55,20 @@ Recon
To access Recon from a browser, use the following command and visit localhost:{{ .Values.recon.service.port }}
$ kubectl port-forward svc/{{ .Release.Name }}-recon {{ .Values.recon.service.port }}:{{ .Values.recon.service.port }}
{{- end }}
+
+****************
+* Replicas *
+****************
+Ozone Manager (om.replicas): {{ .Values.om.replicas }}
+Storage Container Manager (scm.replicas): {{ .Values.scm.replicas }}
+
+{{- $om := .Values.om.replicas | int }}
+{{- $scm := .Values.scm.replicas | int }}
+{{- if eq (mod $om 2) 0 }}
+WARNING: om.replicas={{ $om }} is even. Odd replica counts (1, 3, 5, ...) are recommended for Raft quorum.
+Even counts may be used temporarily during OM migration (bootstrap/decommission), but are not recommended as a steady state.
+{{- end }}
+{{- if eq (mod $scm 2) 0 }}
+WARNING: scm.replicas={{ $scm }} is even. Odd replica counts (1, 3, 5, ...) are recommended for Raft quorum.
+Even counts may be used temporarily during SCM migration (bootstrap/decommission), but are not recommended as a steady state.
+{{- end }}
Review Comment:
```suggestion
{{- if eq (mod .Values.om.replicas 2) 0 }}
WARNING: om.replicas={{ .Values.om.replicas }} is even. Odd replica counts (1, 3, 5, ...) are recommended for Raft quorum.
Even counts may be used temporarily during OM migration (bootstrap/decommission), but are not recommended as a steady state.
{{- end }}
{{- if eq (mod .Values.scm.replicas 2) 0 }}
WARNING: scm.replicas={{ .Values.scm.replicas }} is even. Odd replica counts (1, 3, 5, ...) are recommended for Raft quorum.
Even counts may be used temporarily during SCM migration (bootstrap/decommission), but are not recommended as a steady state.
{{- end }}
```
Looks like this `int` cast is redundant, so we can simplify by using the properties directly.
##########
charts/ozone/templates/NOTES.txt:
##########
@@ -55,3 +55,20 @@ Recon
To access Recon from a browser, use the following command and visit localhost:{{ .Values.recon.service.port }}
$ kubectl port-forward svc/{{ .Release.Name }}-recon {{ .Values.recon.service.port }}:{{ .Values.recon.service.port }}
{{- end }}
+
+****************
+* Replicas *
+****************
Review Comment:
```suggestion
****************
* Replicas *
****************
```
Nit: Let's adjust the alignment to have three spaces on both sides.
--
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: issues-unsubscribe@ozone.apache.org
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
Re: [PR] HDDS-13828. Verify number of replicas for om and scm [ozone-helm-charts]
Posted by "shuan1026 (via GitHub)" <gi...@apache.org>.
shuan1026 commented on PR #45:
URL: https://github.com/apache/ozone-helm-charts/pull/45#issuecomment-5015488964
Thanks for the review, @dnskr! Both suggestions have been applied:
- Fixed the NOTES.txt header alignment
- Removed the redundant int cast, using .Values.om.replicas / .Values.scm.replicas directly
- Also, the RATIS-2296 link is add into the PR description.
--
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: issues-unsubscribe@ozone.apache.org
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
Re: [PR] HDDS-13828. Verify number of replicas for om and scm [ozone-helm-charts]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #45:
URL: https://github.com/apache/ozone-helm-charts/pull/45#issuecomment-5011509189
@dnskr please review if you have time
--
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: issues-unsubscribe@ozone.apache.org
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
Re: [PR] HDDS-13828. Verify number of replicas for om and scm [ozone-helm-charts]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #45:
URL: https://github.com/apache/ozone-helm-charts/pull/45
--
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: issues-unsubscribe@ozone.apache.org
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