HDDS-15875. OM should validate software versions of peers before accepting finalize command#10777
Open
errose28 wants to merge 9 commits into
Open
Conversation
(cherry picked from commit c7d4e14) Conflicts: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OMAdminProtocolServerSideImpl.java hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/upgrade/TestOMStartFinalizeUpgradeRequest.java
Contributor
Author
|
I added a hidden force flag to the CLI and RPC. Since the version checks also require all OMs (and later SCMs) to be up during finalize, the force flag allows finalizing even if some of these nodes are down indefinitely. In most cases the cluster should be restored to a healthy state before finishing the upgrade by finalizing it, but this provides a back door if any issues arise later. This flag will be forwarded from OM to SCM as well in #10783, which makes that PR dependent on this one. |
errose28
marked this pull request as ready for review
July 17, 2026 21:17
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?
When the OM first receives a finalization command from the user (
StartFinalizeupgradeRequest), it will contact each OM peer and validate that all their software versions match before proceeding with finalization. Otherwise it will reject the request back to the user.To do this, a new RPC was added to
OMAdminProtocolto retrieve the software version from an individual OM. The client facingQueryUpgradeStatuswas not reused for this since the transport layer only supports sending that to the leader. Having a separate RPC also lets the two protocols evolve independently.These checks are a best effort to catch obvious user error. Therefore some more complicated checks were intentionally skipped:
applyTransaction, this was not implemented due to extra complexity and incongruence with the leader execution project.What is the link to the Apache JIRA
HDDS-15875
How was this patch tested?
Unit test simulating peers in different software versions added. Existing integration and acceptance tests should continue to pass since peers should already be reachable and in the same software version.