HDDS-16035. Secure SCM HA cluster cannot start: the primary SCM refuses to sign certificates for the other SCMs when there is no leader - #10916
Open
ss77892 wants to merge 1 commit into
Open
Conversation
…es to sign certificates for the other SCMs when there is no leader Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
HDDS-16035. Secure SCM HA cluster cannot start: the primary SCM refuses to sign certificates for the other SCMs when there is no leader
HDDS-16035. Secure SCM HA cluster cannot start: the primary SCM refuses to sign certificates for the other SCMs when there is no leader.
Let a single narrow case skip the leader check: a GetSCMCertificate request that is not a renewal, served by the primary SCM (the one holding the root CA), at a moment when no leader is known. Signing on that path also needs a serial number and a database write, which normally go through Ratis, so it would use a direct serial allocator next to the existing SequenceIdGenerator.upgradeToCertificateSequenceId() and the existing unreplicated storeValidScmCertificate() write that persistPrimarySCMCerts() already uses on every primary start. The current checkValidCertID() check stays, so a repeated serial is refused and never issued, and the path logs a warning so an operator can see it ran. Everything else keeps the leader check: renewals, non-primary SCMs, and OM and datanode certificates. When a leader exists, nothing changes, so this is not a revert of HDDS-8286. It needs no proto change, no new config key, and no interface change. One known gap to note: a certificate signed this way is written only in the primary's local database, which is the same exposure persistPrimarySCMCerts() already has, and each SCM keeps its own certificate on local disk, so startup does not depend on the replicated copy.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16035
How was this patch tested?