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

Add a note in the UI when restoring a snapshot with include_global_state: true that system indices will be overwritten #92916

Closed
gwbrown opened this issue Feb 25, 2021 · 7 comments · Fixed by #95104
Assignees
Labels
enhancement New value added to drive a business result 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

@gwbrown
Copy link

gwbrown commented Feb 25, 2021

Elasticsearch recently added the concept of "Feature States" to snapshots to formalize the process of snapshotting data in system indices (see elastic/elasticsearch#63513). We do not consider this a breaking change as it only impacts snapshots taken by ES >=7.12.0, but it does mean that the behavior when restoring a snapshot with include_global_state set to true is slightly different than it was previously in the 7.x series.

In order to make users more aware of this change, we'd like to consider conditionally adding a note to the UI when restoring a snapshot that would trigger this different behavior.

To be precise, we'd want to show this when:

  1. The snapshot being restored was created by ES 7.12.0 or higher; and
  2. The include_global_state flag is set to true on the restore call; and
  3. The user has not explicitly configured which Feature States to restore (which I don't believe is possible in the UI yet as of Kibana 7.12.0 - this is OK and was known when shipping this feature in 7.12.0)

If we wanted to be really fancy, the snapshot info returned by the Get Snapshot API contains the indices that will be overwritten, which we could verify against the list of indices that exist in the cluster. However, unless this is very straightforward, it's almost certainly more complex than we need for this use case.

A first draft of the note text would be something like:

Note: As of Elasticsearch 7.12.0, when this snapshot is restored, some system indices will be overwritten with data from the snapshot. If this is not what you want, set `include_global_state` to `false` or explicitly configure which feature states to restore.

Possibly linking to the restore API docs or other docs as appropriate.

@cjcenizal cjcenizal added enhancement New value added to drive a business result Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Feb 25, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@cjcenizal
Copy link
Contributor

This is related to #83014, so consult that issue when addressing this one.

@alisonelizabeth alisonelizabeth self-assigned this Mar 3, 2021
@alisonelizabeth
Copy link
Contributor

Hi @gwbrown @cjcenizal! I started looking into this. As-is, I think it is pretty straightforward to implement. However, I have a few questions/concerns about the overall user flow. Let me know what you think.

  1. The suggested message says "... or explicitly configure which feature states to restore.". I worry this is going to be confusing to users if we don't yet support feature states in the UI. Do we have another issue open to support features states?
  2. I also think it could be potentially confusing to users that what is specified in the indices array could be overridden by either include_global_state or feature_states. I say this mainly because we have a "review" step in the UI that lists the indices the user has selected to add to a policy and/or restore. This is based on the indices field, but it seems like this could be misleading.

For example, here, I have include_global_state set to true, plus I have selected 1 index, but the review step currently only shows the 1 index, rather than 1 index + system indices.
Edit-policy-Snapshot-and-Restore-Elastic

@cjcenizal
Copy link
Contributor

@alisonelizabeth Looks like we don't yet have an issue for feature states support in the UI. I think we can remove that bit from the message to make it less confusing.

In terms of the review step, what would make this less confusing for the user? Maybe we could add an additional bullet at the end that says "System indices", perhaps with a tooltip to explain what they are and why they're being restored.

@alisonelizabeth
Copy link
Contributor

@alisonelizabeth Looks like we don't yet have an issue for feature states support in the UI. I think we can remove that bit from the message to make it less confusing.

👍 I can go ahead and create an issue for feature states, assuming it is something we want to support in the UI.

In terms of the review step, what would make this less confusing for the user? Maybe we could add an additional bullet at the end that says "System indices", perhaps with a tooltip to explain what they are and why they're being restored.

That's a possibility. I think adding the message outlined in the issue is a step in the right direction, explaining the new behavior to the user. Perhaps that is sufficient for now, as the user would also see if global state is enabled or not on the review step.

@gwbrown
Copy link
Author

gwbrown commented Mar 22, 2021

I agree, we can remove that bit (at least until we support feature_states in the UI).

Another possibility on the "confusing" point: Assuming we have the snapshot info at this point (the result of GET _snapshot/<repo_name>/<snapshot_name>), it contains a list of feature states (under the feature_states key), each of which specify which indices are part of that feature state. So rather than just a single bullet that says "System Indices", we could list the indices that will be restored (possibly only for 7.x, given that we want to hide system indices as implementation details in 8.0+ in most places).

@alisonelizabeth
Copy link
Contributor

Thanks! I've opened #95128 to track the UI work for feature_states and address the possible confusion around which system indices (if any) will be restored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result 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