Skip to content

HDDS-13828. Verify number of replicas for om and scm#45

Open
shuan1026 wants to merge 1 commit into
apache:mainfrom
shuan1026:HDDS-13828
Open

HDDS-13828. Verify number of replicas for om and scm#45
shuan1026 wants to merge 1 commit into
apache:mainfrom
shuan1026:HDDS-13828

Conversation

@shuan1026

@shuan1026 shuan1026 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

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:
# 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'

@adoroszlai

Copy link
Copy Markdown
Contributor

@dnskr please review if you have time

@adoroszlai
adoroszlai requested a review from Tejaskriya July 18, 2026 13:53

@dnskr dnskr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The templating looks good and the changes address the issue discussion.

I left two minor comments, and once those are handled, could you also add RATIS-2296 link into the PR description?

Comment thread charts/ozone/templates/NOTES.txt
Comment thread charts/ozone/templates/NOTES.txt Outdated
@shuan1026

Copy link
Copy Markdown
Contributor Author

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.

@chungen0126 chungen0126 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants