Skip to content

Fix Snapshot Repository Corruption in Downgrade Scenarios #50692

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

Merged

Conversation

original-brownbear
Copy link
Member

@original-brownbear original-brownbear commented Jan 7, 2020

This PR introduces test infrastructure for downgrading a cluster while interacting with a given repository.
It fixes the fact that repository metadata in the new format could be written while there's still older snaphshots in the repository that require the old-format metadata to be restorable.

This PR does not yet introduce a new field in RepositoryData to avoid old versions from corrupting the repository. That will have to happen in a subsequent PR once the ability to read the new min_version field has been backported to 7.6 (see related TODO in the diff).

Marked non-issue since this problem never made it into a release.

@original-brownbear original-brownbear added WIP :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.6.0 labels Jan 7, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore)

@original-brownbear original-brownbear marked this pull request as ready for review January 7, 2020 20:41
@original-brownbear
Copy link
Member Author

@ywelsch thanks, all addressed again I think

Copy link
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM - only left minor comments. I do like the tests.

@original-brownbear
Copy link
Member Author

Jenkins run elasticsearch-ci/2 (known unrelated ILM issue)

@original-brownbear
Copy link
Member Author

Jenkins run elasticsearch-ci/2 (known ILM test failure again)

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the extra iterations!

@original-brownbear
Copy link
Member Author

Thanks Yannick + Tanguy!

@original-brownbear original-brownbear merged commit ee6fbcc into elastic:master Jan 9, 2020
@original-brownbear original-brownbear deleted the test-downgrade-bwc branch January 9, 2020 14:31
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jan 9, 2020
)

This PR introduces test infrastructure for downgrading a cluster while interacting with a given repository.
It fixes the fact that repository metadata in the new format could be written while there's still older snapshots in the repository that require the old-format metadata to be restorable.
original-brownbear added a commit that referenced this pull request Jan 9, 2020
…50797)

* Fix Snapshot Repository Corruption in Downgrade Scenarios (#50692)

This PR introduces test infrastructure for downgrading a cluster while interacting with a given repository.
It fixes the fact that repository metadata in the new format could be written while there's still older snapshots in the repository that require the old-format metadata to be restorable.
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jan 10, 2020
Follow up to elastic#50692 that starts writing a `min_version` field to
the `RepositoryData` so that pre-7.6 ES versions can not read it
(and potentially corrupt it if they attempt to modify the repo contents)
after the repository moved to the new metadata format.
original-brownbear added a commit that referenced this pull request Jan 13, 2020
…50853)

Follow up to #50692 that starts writing a `min_version` field to
the `RepositoryData` so that pre-7.6 ES versions can not read it
(and potentially corrupt it if they attempt to modify the repo contents)
after the repository moved to the new metadata format.
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jan 13, 2020
…lastic#50853)

Follow up to elastic#50692 that starts writing a `min_version` field to
the `RepositoryData` so that pre-7.6 ES versions can not read it
(and potentially corrupt it if they attempt to modify the repo contents)
after the repository moved to the new metadata format.
original-brownbear added a commit that referenced this pull request Jan 13, 2020
…50853) (#50913)

Follow up to #50692 that starts writing a `min_version` field to
the `RepositoryData` so that pre-7.6 ES versions can not read it
(and potentially corrupt it if they attempt to modify the repo contents)
after the repository moved to the new metadata format.
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
)

This PR introduces test infrastructure for downgrading a cluster while interacting with a given repository.
It fixes the fact that repository metadata in the new format could be written while there's still older snapshots in the repository that require the old-format metadata to be restorable.
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
…lastic#50853)

Follow up to elastic#50692 that starts writing a `min_version` field to
the `RepositoryData` so that pre-7.6 ES versions can not read it
(and potentially corrupt it if they attempt to modify the repo contents)
after the repository moved to the new metadata format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants