-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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 import of dangling indices from a later version #34264
Comments
Pinging @elastic/es-distributed |
I have this reproduced => fixing now to not allow restoring a newer index version to an older datanode version. |
* Restore should check minimum version in the cluster and not the current master node's version for compatibility * Closes elastic#34264
I talked about this with @DaveCTurner and the behavior here seems to not necessarily be a bug. We are not actually restoring any data to the old data node in a mixed cluster, all we're doing is acknowledging the restore which puts the newer index in the state and prevent old datanodes from joining. With the change I suggested in #34676 we're preventing putting starting the restore during rolling upgrade which may be less confusing but also reduces functionality during rolling upgrade (which seems to work fine if you have new version data nodes present). => maybe the behavior is ok as is? |
I'd like more information from @Bukhtawar because I tried the steps given to reproduce this and got the expected error when trying to restore a snapshot taken on a 6.4.2 cluster into a 6.4.1 cluster:
To reproduce this needed a cluster that comprised a mix of 6.4.1 and 6.4.2 version nodes. We only expect a cluster of mixed versions to occur during a rolling upgrade, and in this situation we don't expect there to be more 6.4.1 nodes joining the cluster - in fact there are other things you can do during a rolling upgrade that will block the older nodes from joining the cluster, such as simply creating an index, and the solution in all cases is to upgrade the removed node. I think perhaps the docs could be clearer on this subject, but I can't see that we should change the behaviour here. Did this occur during a rolling uprgade, and if so why were there more 6.4.1 nodes joining the cluster? |
@DaveCTurner Thanks for taking a look. We needed to urgently resize our clusters by adding additional capacity which didn't work coz the restore of a higher version of index from another snapshot repository failed the membership checks and subsequently forced us to delete that index. |
I cannot currently see how to reproduce this in a single-version cluster. My attempt, described above, failed with an exception. Can you explain how to reproduce this? |
Root
|
Aha, thanks, that helps. This is a very strange sequence of operations - you are essentially merging two distinct clusters together, which only works today because of the lenience that dangling indices provide. Indeed when I try this I see the vital log message as the later-versioned index is brought into the earlier-versioned cluster:
I think we should not import the dangling 6.4.2 index in this case, because as soon as that has happened no more 6.4.1 nodes can join the cluster - there is no need to snapshot and restore anything. Good catch. |
Today it is possible that we import a dangling index that was created in a newer version than one or more of the nodes in the cluster. Such an index would prevent the older node(s) from rejoining the cluster if they were to briefly leave it for some reason. This commit prevents the import of such dangling indices. Fixes #34264
Today it is possible that we import a dangling index that was created in a newer version than one or more of the nodes in the cluster. Such an index would prevent the older node(s) from rejoining the cluster if they were to briefly leave it for some reason. This commit prevents the import of such dangling indices. Fixes #34264
A higher version of an index 6.3.2 can be restored on a cluster with node version 6.3.1 however when additional nodes try to join the cluster, their membership is restricted based on compatibility checks
which ensures that all indices in the given metadata will not be created with a newer version of elasticsearch as well as that all indices are newer or equal to the minimum index compatibility version.
based on Version#minimumIndexCompatibilityVersion
Elasticsearch version (
bin/elasticsearch --version
): 6.3.1Plugins installed: []
JVM version (
java -version
): JDK 10OS version (
uname -a
if on a Unix-like system): Linux ip-10-212-18-25 4.9.70-25.242.amzn1.x86_64Description of the problem including expected versus actual behavior:
Steps to reproduce:
Provide logs (if relevant):
[2018-10-03T00:00:10,030][INFO ][o.e.d.z.ZenDiscovery ] [wowvdMi] failed to send join request to master [{5GZT6AM}{5GZT6AMsSSy2x5vCdDLFXA}{1aYFoazmRXWt2OKoo3Slfg}{10.xx.xxx.xxx}{10.xx.xxx.xxx:9300}], reason [RemoteTransportException[[5GZT6AM][10.xx.xx.xxx:9300][internal:discovery/zen/join]]; nested: IllegalStateException[index [index-docs_2018092113/fKi49vf3TzKDshgg9ydzaQ] version not supported: 6.3.2 the node version is: 6.3.1]; ]
The text was updated successfully, but these errors were encountered: