Skip to content

HDDS-15034. Query SCM status for ozone admin upgrade status command#10084

Merged
sodonnel merged 10 commits intoapache:HDDS-14496-zdufrom
dombizita:HDDS-15034
Apr 27, 2026
Merged

HDDS-15034. Query SCM status for ozone admin upgrade status command#10084
sodonnel merged 10 commits intoapache:HDDS-14496-zdufrom
dombizita:HDDS-15034

Conversation

@dombizita
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

After #10011 is merged the hardcoded placeholder responses can be removed and connect it to SCM for real values. Based on @errose28's suggestion I used HDDSLayoutVersionManager to check the finalization status of SCM and added a new counter to SCMNodeManager to keep track of the number of DNs finalized and used that for the ozone admin upgrade status output.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15034

How was this patch tested?

Added tests, green CI on my fork: https://github.com/dombizita/ozone/actions/runs/24517013218

@dombizita dombizita requested review from errose28 and sodonnel April 17, 2026 09:13
@github-actions github-actions Bot added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Apr 17, 2026
@dombizita
Copy link
Copy Markdown
Contributor Author

Thank you for the review @sodonnel, addressed your comments in the latest commit.

@dombizita
Copy link
Copy Markdown
Contributor Author

Thanks @sodonnel, based on you comments and offline discussion I agree that it's safer and easier to just get the count each time while iterating through the nodes and not store it as a counter, which could go out of sync because of corner cases

Copy link
Copy Markdown
Contributor

@sodonnel sodonnel left a comment

Choose a reason for hiding this comment

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

This version looks good if we get green CI.

Copy link
Copy Markdown
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @dombizita. I don't think we are quite ready to merge yet.

Copy link
Copy Markdown
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

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

LGTM. Just one minor comment on the docs but we can add it to whatever PR comes next. @sodonnel would you like to check again before merging?


for (DatanodeDetails dn : getAllNodes()) {
try {
// Only count HEALTHY nodes. STALE/DEAD nodes are intentionally excluded
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.

We can put this in the javadoc for the method to indicate the nodes it is operating on. Also we should document the reasoning for allowing all operational states.

@sodonnel sodonnel merged commit db2219f into apache:HDDS-14496-zdu Apr 27, 2026
84 of 85 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