Skip to content

HDDS-15609. Legacy SCM Finalize command should become a no-op#10543

Open
sodonnel wants to merge 1 commit into
apache:HDDS-14496-zdufrom
sodonnel:HDDS-15609
Open

HDDS-15609. Legacy SCM Finalize command should become a no-op#10543
sodonnel wants to merge 1 commit into
apache:HDDS-14496-zdufrom
sodonnel:HDDS-15609

Conversation

@sodonnel

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Now that finalization is driven from OM, the legacy SCM finalize command should become a no-op.

What is the link to the Apache JIRA

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

How was this patch tested?

New unit test added.

@github-actions github-actions Bot added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Jun 18, 2026
return new StatusAndMessages(ALREADY_FINALIZED, Collections.emptyList());
}
finalizeUpgrade();
return new StatusAndMessages(STARTING_FINALIZATION, Collections.emptyList());

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.

The enum value is correct since the client requires this for the command to succeed, which is required by old scripts or clients which will then move on to OM automatically. For human operators we should probably add some content in the messages to indicate that this is a no-op and OM drives all the finalization.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The enum value is correct since the client requires this for the command to succeed, which is required by old scripts or clients which will then move on to OM automatically.

Are you saying we should always return ALREADY_FINALIZED, otherwise the old script will be stuck waiting for SCM to complete, which will never happen as this is a NOOP?

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.

Actually you're correct, it needs to return ALREADY_FINALIZED in both cases so that we don't enter the monitoring loop, which will never complete. That also satisfies this requirement so the command exits successfully. Let's add a comment here explaining this.

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.

As for the messages, unfortunately the old client doesn't print them until we enter the monitoring loop, so it's fine to remain an empty list here.

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