HDDS-16300. Allow the Ozone Manager to dynamically reconfigure its SCM node list (ozone.scm.nodes / ozone.scm.address) without a restart - #11218
Open
hani-fouladgar wants to merge 1 commit into
Conversation
…(ozone.scm.nodes / ozone.scm.address) without a restart
aryangupta1998
requested review from
ivandika3 and
szetszwo
and removed request for
ivandika3
September 10, 2026 19:24
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?
When an SCM is added to (or removed from) an SCM-HA ring, the OM only learns the new membership from
ozone.scm.nodes.<serviceId>/ozone.scm.address.<serviceId>.<nodeId>at startup. The OM's SCM block and container failover proxy providers build their node list once in their constructor, so reaching a newly added SCM previously required restarting the OM. This makes SCM scale-out/migration disruptive for the OM.Please describe your PR in detail:
Approach
Make the OM's SCM proxy providers reloadable and drive the reload through the existing reconfiguration mechanism, so no restart is needed.
SCMFailoverProxyProviderBase.changeConfig()(new): reloads the node list and addresses from the (already-updated) configuration.loadConfigs()now builds the new node list / proxy-info map in temporaries and commits them only after the whole config parses successfully. Adding an SCM requires two properties (the node list and the new node's address); they may be applied in either order, and if the node list is updated first the reload throws and leaves the previous state intact so the operator can retry.RPC.stopProxy) so the next call dials the fresh address.HAUtils: added overloads ofgetScmBlockClient/getScmContainerClientthat accept a caller-supplied proxy provider, so the OM can keep the reference needed to reload it.ScmClient.reloadScmNodes()(new): delegates to changeConfig() on the block and container providers; a no-op when providers are absent (e.g. mock-constructed clients).OzoneManager: constructs and retains the block/container proxy providers, passes them toScmClient, and — only when an SCM service id is configured (SCM HA) — registersozone.scm.nodes.<serviceId>and, as a prefix,ozone.scm.address.<serviceId>.as reconfigurable. ThereconfScmNodescallback rejects an empty node list and otherwise triggersreloadScmNodes(). The address keys are registered as a prefix because a newly added node's key does not exist at startup and cannot be registered by name in advance.This mirrors the existing datanode-side SCM reconfiguration (HDDS-16.x,
TestDatanodeSCMNodesReconfiguration) and keeps service boundaries intact — the OM only reloads its own client proxies.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16300
How was this patch tested?
Testing
TestSCMFailoverProxyProviderChangeConfig(unit):changeConfig()adds a node, removes a node while keeping the current-proxy pointer valid, and fails cleanly (leaving state intact) when a referenced node's address is missing.TestScmClient(unit):reloadScmNodes()delegates to both providers; no-op when providers are null.TestOmSCMNodesReconfiguration(integration, SCM-HAMiniOzoneCluster): the SCM node list and per-node address prefix are reconfigurable on a running OM; an empty node list is rejected; a valid reconfigure drives the proxy reload end-to-end.Manual Testing
ozone.scm.nodes.scmservicefrom OM (in memory)reconfigthe OM to get the new value from the configreconfigstatusozone.scm.nodes.scmservicefrom OM (in memory)scm3backozone.scm.nodes.scmservicefrom OM (in memory)reconfigthe OM to get the new value from the configreconfigstatusozone.scm.nodes.scmservicefrom OM (in memory)curl -s http://localhost:9874/conf | tr -d '\n' | grep -oE 'ozone.scm.(address|nodes).scmservice\s*[^<]+'
ozone.scm.nodes.scmservicescm1,scm2,scm3
bash-5.1$