-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Prevent deletion of snapshots that are mounted and ILM delete action #73947
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
Comments
Pinging @elastic/es-distributed (Team:Distributed) |
Pinging @elastic/es-core-features (Team:Core/Features) |
@henningandersen suggested the idea to add a flag to the existing Mount API to indicate that the index "owns" the snapshot and that it should be deleted when the searchable snapshot index is deleted. I'm going to give it try. |
The word `cannot` implies Elasticsearch prevents you from doing these things, but it doesn't have this protection today (see elastic#73947). This commit clarifies this by saying `must not` instead. Closes elastic#108450
The word `cannot` implies Elasticsearch prevents you from doing these things, but it doesn't have this protection today (see elastic#73947). This commit clarifies this by saying `must not` instead. Closes elastic#108450
The word `cannot` implies Elasticsearch prevents you from doing these things, but it doesn't have this protection today (see elastic#73947). This commit clarifies this by saying `must not` instead. Closes elastic#108450
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi @tlrx and @DaveCTurner hope you are doing well. We have observed this issue happened from time to time, and users get a big surprise during the next ECH configuration (plan) change where frozen nodes restart and that wipes out the cache on disk, while before that, they could do searchable snapshot deletion and then search without any issue, which leads to a wrong understanding that deleting searchable snapshots is not a problem but actually it is. Could we make at least the human deletion to be more restricted? e.g. adding a And for ILM auto-managed ones, we apply the This is similar to what we have for license management: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post By doing so, we can prevent inadvertent or accidental "manual deletion", and ILM things, we can improve the docs to make it more clear. |
Today nothing prevents the deletion of a snapshot that is used by a searchable snapshot index. If such a snapshot is deleted the mounted index will go RED in the future. We started to implement a check in #73821 to prevent the deletion of snapshots that are used by searchable snapshots indices within the same cluster and it made some ILM tests to fail.
ILM has a delete index action
DeleteAction
with adelete_searchable_snapshot
flag that, when set totrue
(the default value), deletes the snapshot that is mounted before deleting the index. ILM deletes the snapshot before the index because the information about the snapshot are stored in the index's metadata (under the ILM custom metedata). If ILM was deleting the searchable snapshot index before the snapshot it would not know which snapshot to delete.I still think it is important to prevent the deletion of mounted snapshots so we should investigate how to keep the ILM behavior while implementing a safety check in #73821.
I can see different solution and I'm opening this issue to discuss them:
The text was updated successfully, but these errors were encountered: