New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-4645. Starting OM with the --upgrade flag should delete the prepare marker file. #1798
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Still need to figure out how to do robot test.
* HDDS-3698-upgrade: HDDS-4612. Create OMCancelPrepareRequest and Response to cancel the prepared state of an OM. (apache#1765)
Does not test anything new, but starts the cluster and seems to work.
Note that currently there is an issue in the marker file when the OM comes back up, and that is what takes it out of prepare bfore the --upgrade flag is processed.
… in prepare request
avijayanhwx
reviewed
Jan 15, 2021
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManagerStarter.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManagerStarter.java
Show resolved
Hide resolved
...e/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java
Outdated
Show resolved
Hide resolved
...e/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java
Outdated
Show resolved
Hide resolved
avijayanhwx
reviewed
Jan 16, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the review comments. Approach looks good to me. A few more comments inline after reviewing the acceptance test.
avijayanhwx
approved these changes
Jan 20, 2021
CI failure is unrelated. Merging the changes. |
errose28
added a commit
to errose28/ozone
that referenced
this pull request
Jan 20, 2021
* HDDS-3698-upgrade: HDDS-4645. Starting OM with the --upgrade flag should delete the prepare marker file. (apache#1798)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
When an OM is put in prepare mode, a marker file is written to disk so that it remains in prepare mode upon restart. After an OM has been upgraded, it can be restarted with a --upgrade flag to automatically delete the marker file and take the OM out of prepare mode.
This patch incorporates work in progress changes from HDDS-4610 to make sure that the commit transaction after prepare updates the transaction index in the OM DB, so it matches the index of the prepare marker file when the OM comes back up.
What is the link to the Apache JIRA
HDDS-4645
Testing
Acceptance test added.
The added test uses a similar approach to the existing upgrade acceptance test to restart the OMs. All containers in the cluster write their state to mounted volumes, and nodes are restarted by restarting their containers. These restarted containers have the previous on disk state still persistent in the volume when it is mounted on restart.