HDDS-15622. New finalize command should check OM server version - #10548
Merged
Conversation
dombizita
approved these changes
Jun 22, 2026
dombizita
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me, one minor nit about a log message.
errose28
approved these changes
Jun 24, 2026
errose28
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Looking through the RpcClient there's some cleanup that can be done with how the OM version is handled. I've bookmarked it to do later.
| try (OzoneManagerProtocol client = getClient()) { | ||
| OzoneManagerVersion omVersion = RpcClient.getOmVersion(client.getServiceInfo()); | ||
| if (!OzoneManagerVersion.ZDU.isSupportedBy(omVersion)) { | ||
| err().println("OM does not support ZDU. The cluster should be finalized with `ozone admin om finalizeupgrade`"); |
Contributor
There was a problem hiding this comment.
nit. Remove the acronym for a more user friendly message. Can be changed in one of the follow-up CLI PRs instead of this one.
Suggested change
| err().println("OM does not support ZDU. The cluster should be finalized with `ozone admin om finalizeupgrade`"); | |
| err().println("OM does not support zero downtime upgrade. The cluster should be finalized with `ozone admin om finalizeupgrade`"); |
Contributor
|
Thanks for working on it @sodonnel! Thanks for the review @chungen0126 and @errose28! |
errose28
added a commit
to errose28/ozone
that referenced
this pull request
Jun 26, 2026
* HDDS-14496-zdu: HDDS-15622. New finalize command should check OM server version (apache#10548) HDDS-15609. Legacy SCM Finalize command should become a no-op (apache#10543) HDDS-15528. Adjust upgrade finalize command to call OM instread of SCM (apache#10493) HDDS-15488. Recon upgrade actions should be idempotent (apache#10442) HDDS-15482. Add fencing based on datanode versions to SCM and Recon (apache#10504) HDDS-15374. Switch Recon to the new versioning framework (apache#10443)
errose28
added a commit
to errose28/ozone
that referenced
this pull request
Jul 13, 2026
* HDDS-14496-zdu: (363 commits) HDDS-15639. Adjust Upgrade status command to call OM intead of SCM (apache#10579) HDDS-15622. New finalize command should check OM server version (apache#10548) HDDS-15609. Legacy SCM Finalize command should become a no-op (apache#10543) HDDS-15528. Adjust upgrade finalize command to call OM instread of SCM (apache#10493) HDDS-15488. Recon upgrade actions should be idempotent (apache#10442) HDDS-15482. Add fencing based on datanode versions to SCM and Recon (apache#10504) HDDS-15374. Switch Recon to the new versioning framework (apache#10443) HDDS-15484. Decouple ComponentVersionManager from Storage (apache#10437) HDDS-15386. Remove LayoutFeature interface (apache#10376) HDDS-15379. Remove unused classes from the old upgrade framework (apache#10370) HDDS-15377. Switch SCM to use new ScmVersionManager (apache#10368) HDDS-15483. More renames missed in HDDS-15375 (apache#10436) HDDS-15376. Implement new ScmVersionManager. (apache#10367) HDDS-15208. OM should learn to finalize from SCM after finalization command (apache#10236) HDDS-15375. Renames to prepare to switch SCM to the new versioning framework. (apache#10366) HDDS-15195. Switch Datanode to the new versioning framework (apache#10215) HDDS-15263. Downgrade should happen in reverse order (apache#10269) HDDS-14821. Version specific data validation in rolling-upgrade suite (apache#10033) HDDS-15196. Split HDDS upgrade actions into specific SCM and Datanode actions. (apache#10206) HDDS-14670. SCM queryFinalizeStatus shouldFinalize should only be true when out of safemode (apache#10193) ... Conflicts: hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMUpgradeFinalization.java hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/utils/OzoneManagerRatisUtils.java hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/upgrade/OMCancelPrepareRequest.java hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerStateMachine.java hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/protocolPB/TestOzoneManagerRequestHandler.java
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?
The new upgrade commands (only finalize for now) should check the OM version is ZDU ready, otherwise fail with a helpful error.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15622
How was this patch tested?
New unit test