Skip to content

HDDS-15622. New finalize command should check OM server version - #10548

Merged
dombizita merged 2 commits into
apache:HDDS-14496-zdufrom
sodonnel:HDDS-15622
Jun 24, 2026
Merged

HDDS-15622. New finalize command should check OM server version#10548
dombizita merged 2 commits into
apache:HDDS-14496-zdufrom
sodonnel:HDDS-15622

Conversation

@sodonnel

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Jun 19, 2026

@chungen0126 chungen0126 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.

+1 LGTM

@dombizita dombizita 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.

Looks good to me, one minor nit about a log message.

@errose28 errose28 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.

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`");

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.

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`");

@dombizita
dombizita merged commit f49a2e0 into apache:HDDS-14496-zdu Jun 24, 2026
47 checks passed
@dombizita

Copy link
Copy Markdown
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants