Skip to content

HDDS-15374. Switch Recon to the new versioning framework#10443

Merged
errose28 merged 13 commits into
apache:HDDS-14496-zdufrom
errose28:recon-new-version-manager
Jun 15, 2026
Merged

HDDS-15374. Switch Recon to the new versioning framework#10443
errose28 merged 13 commits into
apache:HDDS-14496-zdufrom
errose28:recon-new-version-manager

Conversation

@errose28

@errose28 errose28 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Create a new ReconVersionManager and corresponding upgrade action provider to manage Recon's versions and finalization. By switching Recon to the same framework as other components, we are able to remove a large amount of custom upgrade code that was previously unique to Recon.

Recon currently handles finalization differently than other components and this is unchanged by this PR:

  • Recon finalizes automatically on startup. The move of the apparent version to match its software version is only to run reformatting actions.
  • Recon never used the component version framework previously, so we can switch its ReconLayoutFeature class to ReconVersion implements ComponentVersion with no migration concerns
  • Recon also has an HDDSVersion the same as SCM and Datanode inside its NodeManager implementation, which is stored in a VERSION file.

Existing Issues Fixed

  • Before this PR, the persisted HDDS version in Recon was never updated, so it would remain at the software version Recon was first initialized in. This just happened to work because Recon's NodeManager was only depending on apparent version (MLV before the switch) for debug logging.

    • This may not be true going forward, so this PR finalizes the HDDS version with the Recon version on startup.
    • HDDS-15482 will also add logging based on the software/apparent version matrix between SCM and Recon. The existing logging has been removed for now.
  • Recon previously ran upgrade actions and apparent version increases in the same SQL transaction. This is no longer required after HDDS-15488. Recon upgrade actions should be idempotent #10442 which allows us to use shared ComponentVersionManager code for this.

  • Recon's initial upgrade action will not run after this change. That is fixed in HDDS-15349. Recon's INITIAL_VERSION should not have an upgrade action #10500. See the description there for details.

What is the link to the Apache JIRA

HDDS-15374

How was this patch tested?

Unit tests for new Recon version manager added.

@errose28 errose28 added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Jun 5, 2026
errose28 added 4 commits June 12, 2026 10:28
* HDDS-14496-zdu:
  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)

Conflicts:
hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/AbstractComponentVersionTest.java
hadoop-hdds/docs/content/design/upgrade-dev-primer.md
hadoop-hdds/framework/src/main/java/org/apache/hadoop/ozone/upgrade/ComponentVersionManager.java
hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/upgrade/TestHDDSLayoutFeature.java
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMStorageConfig.java
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/upgrade/ScmVersionManager.java
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/server/upgrade/TestScmVersionManager.java
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestHSyncUpgrade.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/upgrade/TestDNDataDistributionFinalization.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/upgrade/TestScmDataDistributionFinalization.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/upgrade/TestScmHAFinalization.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/multitenant/TestMultiTenantVolume.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/service/TestBlockDeletionService.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshot.java
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/UniformDatanodesFactory.java
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/response/upgrade/package-info.java
hadoop-ozone/recon/pom.xml
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconStorageContainerManagerFacade.java
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/upgrade/ReconUpgradeActionProvider.java
@errose28 errose28 merged commit 5361f6e into apache:HDDS-14496-zdu Jun 15, 2026
108 of 109 checks passed
errose28 added a commit to errose28/ozone that referenced this pull request Jun 15, 2026
* HDDS-14496-zdu:
  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)
errose28 added a commit to errose28/ozone that referenced this pull request Jun 15, 2026
* HDDS-14496-zdu:
  HDDS-15374. Switch Recon to the new versioning framework (apache#10443)

Conflicts:
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/upgrade/InitialConstraintUpgradeAction.java
errose28 added a commit to errose28/ozone that referenced this pull request Jun 15, 2026
* HDDS-14496-zdu:
  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)

Conflicts:
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/upgrade/InitialConstraintUpgradeAction.java
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/upgrade/ReconUpgradeAction.java
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/upgrade/UnhealthyContainerReplicaMismatchAction.java
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/upgrade/UnhealthyContainersStateContainerIdIndexUpgradeAction.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.

2 participants