-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Prevent downgrades from 8.x to 7.x #78638
Merged
elasticsearchmachine
merged 2 commits into
elastic:master
from
DaveCTurner:2021-10-04-prevent-downgrade-to-7x-redux
Oct 14, 2021
Merged
Prevent downgrades from 8.x to 7.x #78638
elasticsearchmachine
merged 2 commits into
elastic:master
from
DaveCTurner:2021-10-04-prevent-downgrade-to-7x-redux
Oct 14, 2021
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
Users sometimes attempt to downgrade a node in place, but downgrades are totally untested and unsupported and generally don't work. We protect against this by recording the node version in the metadata and refusing to start if we encounter metadata written by a future version. However in 8.0 (elastic#42489) we changed the directory layout so that a 7.x node won't find the upgraded metadata, or indeed any other data, and will proceed as if it's a fresh node. That's almost certainly not what the user wants, so with this commit we create a file at `${path.data}/nodes` at each startup, preventing an older node from starting. Closes elastic#52414
DaveCTurner
added
>enhancement
:Distributed/Cluster Coordination
Cluster formation and cluster state publication, including cluster membership and fault detection.
v8.0.0
labels
Oct 4, 2021
Pinging @elastic/es-distributed (Team:Distributed) |
DaveCTurner
added a commit
to DaveCTurner/elasticsearch
that referenced
this pull request
Oct 4, 2021
In elastic#78638 we introduced a simple mechanism for blocking downgrades from 8.x to 7.x, but the exception message it generates is not very helpful: org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: FileSystemException[{path.data}/nodes/0: Not a directory]; We can't fix earlier 7.x versions to do something better, but this commit at least means that sufficiently recent 7.x versions will yield a slightly more helpful message.
DaveCTurner
added a commit
that referenced
this pull request
Oct 7, 2021
In #78638 we introduced a simple mechanism for blocking downgrades from 8.x to 7.x, but the exception message it generates is not very helpful: org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: FileSystemException[{path.data}/nodes/0: Not a directory]; We can't fix earlier 7.x versions to do something better, but this commit at least means that sufficiently recent 7.x versions will yield a slightly more helpful message.
DaveCTurner
added
the
auto-merge-without-approval
Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!)
label
Oct 14, 2021
I think this will no longer conflict with #78525 so I'll merge it after a green CI run. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto-merge-without-approval
Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!)
:Distributed/Cluster Coordination
Cluster formation and cluster state publication, including cluster membership and fault detection.
>enhancement
Team:Distributed
Meta label for distributed team
v8.0.0-beta1
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.
Users sometimes attempt to downgrade a node in place, but downgrades are
totally untested and unsupported and generally don't work. We protect
against this by recording the node version in the metadata and refusing
to start if we encounter metadata written by a future version.
However in 8.0 (#42489) we changed the directory layout so that a 7.x
node won't find the upgraded metadata, or indeed any other data, and
will proceed as if it's a fresh node. That's almost certainly not what
the user wants, so with this commit we create a file at
${path.data}/nodes
at each startup, preventing an older node fromstarting.
Closes #52414