Skip to content

HDDS-16356. SCM finalize API should only be reachable by OM - #11177

Open
errose28 wants to merge 6 commits into
apache:HDDS-14496-zdufrom
errose28:worktree/finalize-to-block-protocol
Open

HDDS-16356. SCM finalize API should only be reachable by OM#11177
errose28 wants to merge 6 commits into
apache:HDDS-14496-zdufrom
errose28:worktree/finalize-to-block-protocol

Conversation

@errose28

@errose28 errose28 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

With the new ZDU finalization flow, the admin sends the finalize request to OM and OM forwards it to SCM. The admin is never supposed to finalize SCM directly. This ensures that components are always finalized in the expected order.

Currently SCM's finalize command is under the container location protocol with other admin facing commands guarded by an admin check. This happened to work in the ZDU acceptance test suite because OM was configured as a cluster admin, however this is not expected in a real deployments. Additionally, it allows a custom client created by an admin to invoke this API out of order.

Instead, the new finalize API should be in the block location protocol with similar APIs like deleteKeyBlocks. This protocol is only accessible to principals configured in hdds.security.client.scm.block.protocol.acl, which the admin is expected to set to the OM and SCM's principals. Additionally, the acceptance tests should not configure OM as an admin since it masks issues like this.

What is the link to the Apache JIRA

HDDS-16356

How was this patch tested?

  • Unit tests for the finalize API that used to be in TestSCMClientProtocolServer were moved to TestSCMBlockProtocolServer.

    • This part of the change accounts for ~300 lines of additions/deletions
    • Placing the two diffs side by side will help with the review.
  • OM was removed as an admin in the acceptance tests' global security.conf file.

    • In a CI run on my fork with only this modification all existing acceptance tests passed and the upgrade acceptance test failed as expected.

@errose28
errose28 requested review from dombizita and sodonnel August 31, 2026 19:42
@errose28 errose28 added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Aug 31, 2026
@errose28
errose28 marked this pull request as ready for review August 31, 2026 22:30
Currently ignoring config files used in other secure envs:
   hadoop-ozone/dist/src/main/compose/common/hadoop-security.conf
   hadoop-ozone/dist/src/main/compose/ozonesecure-ha/docker-config
   hadoop-ozone/dist/src/main/compose/xcompat/docker-config
@errose28

errose28 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Additional testing and docs improvements for internal protocol ACLs not related to ZDU are tracked in HDDS-16366.

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.

1 participant