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

[Snapshot & Restore] Snapshot flow for system indices is broken in 8.0+ #120314

Closed
jrodewig opened this issue Dec 3, 2021 · 3 comments · Fixed by #131310
Closed

[Snapshot & Restore] Snapshot flow for system indices is broken in 8.0+ #120314

jrodewig opened this issue Dec 3, 2021 · 3 comments · Fixed by #131310
Assignees
Labels
Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@jrodewig
Copy link
Contributor

jrodewig commented Dec 3, 2021

With elastic/elasticsearch#79670, you can no longer use the indices parameter of the ES create snapshot policy API or the ES restore snapshot API to back up or restore system indices in 8.0+. The creates a few issues for the corresponding snapshot UIs:

Screen Shot 2021-12-02 at 8 13 09 PM

  • Similarly, the restore snapshot wizard lets you select system indices to restore. However, a restore request that includes a system index returns an error. We should update the picker to exclude system indices.

Screen Shot 2021-12-02 at 8 16 08 PM

  • Since the snapshot UI doesn't support feature states, users can no longer selectively back up or restore system indices. You can only back up or restore all system indices as part of the cluster state. This can be an issue if a user only wants to restore specific system indices. For example, a user may want to restore their Kibana feature state but not override the security feature state that controls authentication.

Relates to #95128

@jrodewig jrodewig added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI labels Dec 3, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-management (Team:Stack Management)

@jrodewig jrodewig changed the title [Snapshot & Restore] Snapshot flow for system indices is broken [Snapshot & Restore] Snapshot flow for system indices is broken in 8.0+ Dec 3, 2021
@sabarasaba sabarasaba self-assigned this Dec 8, 2021
@sabarasaba
Copy link
Member

For addressing the first point on hiding system indices when creating a policy a new ES issue has been created elastic/elasticsearch#82671.

For hiding system indices when restoring a snapshot we can leverage the feature_states array returned by the get snapshot api that we currently use. I created a PR for dealing with this #123365

@yuliacech
Copy link
Contributor

yuliacech commented Feb 2, 2022

With @sabarasaba's PR#123365 merged, system indices are no longer listed when restoring a snapshot and when elasticsearch#82671 will be implemented, system indices will not be displayed in the indices field when creating an SLM policy.

Currently, it's already not possible to include system indices via "indices" field (elasticsearch#79670 and elasticsearch#81235): when a wildcard is used, matching system indices will be ignored and when a system index is included by name, an error will be thrown when the policy is run. Users can only backup all system indices by enabling the toggle "include global state".

We need to add a combobox, when the toggle is disabled, that would list available features as options and would allow the user to select specific features for backup. A list of features is returned by the Get features API. The same combobox should be added to the "restore snapshot flow" as well (see #95128)

Also, the validation should allow the user to either backup only "normal" data streams and indices or only features (system indices). Currently, the "indices" field is mandatory in the UI (but not in the API).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants