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] Remove cloud validation for slm policy #93609

Conversation

alisonelizabeth
Copy link
Contributor

Fixes #92990

Per #92990 (comment), we should no longer be restricting a user from adding more than one policy to a cloud-managed repository. This PR removes the validation logic we had in place for this.

Note: There was not an existing test for this validation, and since this is functionality being removed, I did not add any tests for this specific scenario. However, I did update the existing validation tests for the logistics step to be more robust.

How to test

You will need to mock the cloud environment to test this PR.

  1. Specify the path.repo variable when starting ES:

    yarn es snapshot --license trial -E path.repo=/tmp/es-backups
    
  2. Add the cluster.metadata.managed_repository and cluster.metadata.managed_policies settings via Console:

    PUT /_cluster/settings
    {
      "persistent": {
        "cluster.metadata.managed_repository": "found-snapshots",
        "cluster.metadata.managed_policies": ["managed-policy"]
      }
    }
    
  3. Create a repository with the same name as your setting value (found-snapshots)

  4. Create a policy with the same name as your setting value (managed-policy)

  5. Verify you are able to create a second SLM policy with the found-snapshots repository without any validation errors.

Release note

The Snapshot and Restore UI now allows a user to configure more than one Snapshot Lifecycle Management (SLM) policy for a cloud-managed repository.

@alisonelizabeth alisonelizabeth added release_note:fix v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI v7.13.0 labels Mar 4, 2021
@alisonelizabeth alisonelizabeth requested a review from a team as a code owner March 4, 2021 14:40
@elasticmachine
Copy link
Contributor

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

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
snapshotRestore 480.7KB 479.6KB -1.1KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alisonelizabeth,
thanks a lot for fixing this! Tested locally and all worked for me, code LGTM too 👍

@alisonelizabeth alisonelizabeth merged commit 67ca801 into elastic:master Mar 4, 2021
@alisonelizabeth alisonelizabeth deleted the bugfix/sr/cloud_managed_policies branch March 4, 2021 18:02
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 4, 2021
* master: (107 commits)
  [Logs UI] Fix log stream data fetching (elastic#93201)
  [App Search] Added relevance tuning search preview (elastic#93054)
  [Canvas] Fix reports embeddables (elastic#93482)
  [ILM] Added new functional test in ILM for creating a new policy (elastic#92936)
  Remove direct dependency on statehood package (elastic#93592)
  [Maps] Track tile loading status (elastic#91585)
  [Discover][Doc] Improve main documentation (elastic#91854)
  [Upgrade Assistant] Disable UA and add prompt (elastic#92834)
  [Snapshot Restore] Remove cloud validation for slm policy (elastic#93609)
  [Maps] Support GeometryCollections in GeoJson upload (elastic#93507)
  [XY Charts] fix partial histogram endzones annotations (elastic#93091)
  [Core] Simplify context typings (elastic#93579)
  [Alerting] Improving health status check (elastic#93282)
  [Discover] Restore context documentation (elastic#90784)
  [core-docs] Edits core-intro section for the new docs system (elastic#93540)
  add missed codeowners (elastic#89714)
  fetch node labels via script execution (elastic#93225)
  [Security Solution] Adds getMockTheme function (elastic#92840)
  Sort dependencies in package.json correctly (elastic#93590)
  [Bug] missing timepicker:quickRanges migration (elastic#93409)
  ...
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 NeededFor:Cloud release_note:fix Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Snapshot Restore] Unable to create multiple SLM policies for a single repository
5 participants