Skip to content

HDDS-14826. Prepare OM to switch from LayoutVersionManager to ComponentVersionManager#10098

Merged
errose28 merged 7 commits into
apache:HDDS-14496-zdufrom
errose28:om-version-manager-no-prod
Apr 27, 2026
Merged

HDDS-14826. Prepare OM to switch from LayoutVersionManager to ComponentVersionManager#10098
errose28 merged 7 commits into
apache:HDDS-14496-zdufrom
errose28:om-version-manager-no-prod

Conversation

@errose28

@errose28 errose28 commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This PR adds functionality and renames to prepare OM to be switched to the new versioning framework. This PR is intended to have no impact to production code and does not do any functional migration. It:

  • Renames old layout version terminology to the new apparent version terminology
  • Adds functionality to the previously introduced OMVersionManager to load upgrade actions that correspond to different versions.
    • By separating upgrade action loading from the version manager itself, we can do things like inject different upgrade actions for testing, and later bind different upgrade actions for SCM and Datanodes even though they use the same HDDSVersionManager.
  • Adds testing that OMVersionManager can handle unknown or invalid apparent versions on startup and fixes an issue in this area.
  • Moves all upgrade finalization logic for the new framework within the version manager.
    • For OM (and later SCM), this includes the ability to finalize from a snapshot.
    • Upgrade finalizer and executor classes will not be required and can be removed when all components are switched to the new framework.

OM version framework migration is completed in #10099. Reference that PR to see how the changes here are used.

What is the link to the Apache JIRA

HDDS-14826

How was this patch tested?

All tests pass on my fork.

New unit tests were added for new version manager functionality like detecting invalid versions at startup and executing upgrade actions. Existing tests are expected to pass since the new version manager is not yet used in prod code.

…d small cleanups

- Add ComponentVersionManager / HDDSVersionManager / OMVersionManager and
  related upgrade framework pieces (no OM production wiring).
- Move @DisallowedUntilLayoutVersion onto preExecute for snapshot move
  requests; minor DN/doc/repair/freon cleanups.
- Include HDDS-side renames and SCM wiring updates that accompany the
  version-manager refactor (no functional change on the HDDS side).
- Keep LayoutVersionManager + AbstractLayoutVersionManager implementing it
  until OM wiring PR (HDDS matches feature except those two files).
- Include OM wire-compatibility/doc/deprecation proto tweaks, OMStorage
  apparent-version init alignment, finalize-upgrade response naming, and a
  comment clarification in OzoneManagerRequestHandler (no OM prod wiring).
…ntVersion() for PR1 compile

Made-with: Cursor
@errose28
errose28 requested review from dombizita and sodonnel April 20, 2026 22:01
@errose28 errose28 added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Apr 20, 2026
@errose28
errose28 marked this pull request as ready for review April 21, 2026 13:47

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

I think this looks OK. +1 to commit and we can rebase the next one on top.

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

Thanks for doing this @errose28, overall looks good to me, one nit to change the TODO ticket ID, but it's okay to do it later in #10099

// TODO HDDS-14826: Register upgrade actions based on annotations
@Override
protected void runUpgradeAction(ComponentVersion componentVersion) throws UpgradeException {
// TODO HDDS-14826: Register upgrade actions based on annotations

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: change to the ticket that'll do this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, will update this in the next PR. I actually haven't made the Jiras for the HDDS updates yet.

@errose28
errose28 merged commit 7988537 into apache:HDDS-14496-zdu Apr 27, 2026
58 checks passed
errose28 added a commit to errose28/ozone that referenced this pull request Apr 27, 2026
* HDDS-14496-zdu:
  HDDS-14826. Prepare OM to switch from LayoutVersionManager to ComponentVersionManager (apache#10098)
  HDDS-14896. Use separate container for clients in rolling-upgrade suite (apache#10032)
  HDDS-15034. Query SCM status for ozone admin upgrade status command (apache#10084)
  HDDS-14897. Add multiple S3 gateways to the rolling-upgrade suite (apache#10028)

hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMStorage.java
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestOMStorage.java
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/upgrade/TestOMUpgradeFinalizer.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.

3 participants