Skip to content
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
merged 16 commits into from Jan 20, 2021

Conversation

errose28
Copy link
Contributor

@errose28 errose28 commented Jan 14, 2021

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.

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.
Copy link
Contributor

@avijayanhwx avijayanhwx left a 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
Copy link
Contributor

CI failure is unrelated. Merging the changes.

@avijayanhwx avijayanhwx merged commit 1de63f4 into apache:HDDS-3698-upgrade Jan 20, 2021
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
Labels
None yet
Projects
None yet
2 participants