Skip to content

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

Open
dombizita wants to merge 2 commits intoapache:HDDS-14496-zdufrom
dombizita:HDDS-15034
Open

HDDS-15034. Query SCM status for ozone admin upgrade status command#10084
dombizita wants to merge 2 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
}
}

private static boolean isDatanodeFinalized(LayoutVersionProto layoutVersion) {
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.

You could make this public static and then re-use it in the NodeManager.java class too.

@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
|| UpgradeFinalization.isDone(scmUpgradeStatus);
}

static boolean shouldFinalize(UpgradeFinalization.Status scmUpgradeStatus) {
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 am not sure about this - the shouldFinalize boolean is to instruct other components to finalize when SCM AND the datanodes are done finalizing. So this should be true only if SCM is finalized and all DNs are finalized. The idea is that OM will poll this when OM is unfinalized and it will automatically finalize when this goes true. So I think we need to check num_dns == finalizated_dns && scm == finalized

testProcessLayoutVersionReportHigherMlv();
}

@Test
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 we need a test for registration when a DN is finalized on registration, and not finalized on registration and when the remove_node is called too. This test covers the heartbeat part I think

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