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

[BUG] Unable to restore an index from snapshot that was a write index at the time #16139

Open
JakeHardy14 opened this issue Sep 26, 2024 · 3 comments
Labels
bug Something isn't working Storage:Snapshots

Comments

@JakeHardy14
Copy link

JakeHardy14 commented Sep 26, 2024

What is the bug?
I'm unable to restore an index to OpenSearch from a Snapshot where the Snapshot was taken at the time of the index being the write index for the alias.

Since the snapshot was taken, ISM has naturally rolled over and created new write indices.

I have an ISM enabled index, continually rolling over and deleting indices as they age out. During this process I take a snapshot and store it in my defined repository.

How can one reproduce the bug?
Steps to reproduce the behaviour:

  1. Configure an ISM enabled index, rolling over at regular intervals
  2. Take a snapshot and wait for the ISM policy to cycle through, rolling over and deleting the index
  3. Attempt to restore the index that was (at the time of the snapshot) the write index of an alias
  4. See error "Failed to restore snapshot", "alias [rollover_alias] has more than one write index "

What is the expected behaviour?
I should be able to restore the chosen index, setting explicitly that it should not be the write index.

What is your host/environment?

  • OS: [RedHat 8]
  • Version [v 2.15.0]
  • Plugins [ISM, repository-gcs]

Do you have any screenshots?
Screenshot attached.
Screenshot 2024-09-26 085615

Issue initially raised on the OpenSeach Slack channel;
https://opensearch.slack.com/archives/C051JEH8MNU/p1727277154286109

@JakeHardy14 JakeHardy14 added bug Something isn't working untriaged labels Sep 26, 2024
@AmiStrn
Copy link
Contributor

AmiStrn commented Sep 26, 2024

Maybe worth opening an issue in opensearch core to allow restoring an index without the write alias or without specific aliases. There is a setting to “include_aliases” that can be set to false but it affects both read and write aliases so it would cause unexpected behavior. We might need a “include_write_aliases” that will restore without the write aliases of the indices in the snapshot. This would in turn be used by the index management plugin policy.

@bharath-techie
Copy link
Contributor

@opensearch-project/admin This seems to be an OpenSearch core issue since both rollover and snapshot actions are OpenSearch core actions. Please move this issue to OpenSearch core repository.

@prudhvigodithi prudhvigodithi transferred this issue from opensearch-project/index-management Sep 30, 2024
@dblock dblock removed the untriaged label Oct 14, 2024
@dblock
Copy link
Member

dblock commented Oct 14, 2024

[Catch All Triage - 1, 2, 3, 4]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Storage:Snapshots
Projects
Status: 🆕 New
Development

No branches or pull requests

4 participants