HDDS-15609. Legacy SCM Finalize command should become a no-op#10543
HDDS-15609. Legacy SCM Finalize command should become a no-op#10543sodonnel wants to merge 1 commit into
Conversation
| return new StatusAndMessages(ALREADY_FINALIZED, Collections.emptyList()); | ||
| } | ||
| finalizeUpgrade(); | ||
| return new StatusAndMessages(STARTING_FINALIZATION, Collections.emptyList()); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.