HDDS-15034. Query SCM status for ozone admin upgrade status command#10084
HDDS-15034. Query SCM status for ozone admin upgrade status command#10084dombizita wants to merge 2 commits intoapache:HDDS-14496-zdufrom
Conversation
| } | ||
| } | ||
|
|
||
| private static boolean isDatanodeFinalized(LayoutVersionProto layoutVersion) { |
There was a problem hiding this comment.
You could make this public static and then re-use it in the NodeManager.java class too.
| || UpgradeFinalization.isDone(scmUpgradeStatus); | ||
| } | ||
|
|
||
| static boolean shouldFinalize(UpgradeFinalization.Status scmUpgradeStatus) { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
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 statusoutput.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