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] Listing snapshot-management policies fails when the ism index is not yet created #1055

Closed
aggarwalShivani opened this issue Dec 10, 2023 · 5 comments
Labels
bug Something isn't working untriaged

Comments

@aggarwalShivani
Copy link
Contributor

What is the bug?
Index-management plugin is installed in Opensearch. No policies are created yet, so the index .opendistro-ism-config does not exist yet.

Listing ism policies does not fail, and prints an empty list.

$ curl 127.0.0.1:9200/_plugins/_ism/policies
{"policies":[],"total_policies":0}

However, listing snapshot-management policies throws an exception due to absence of the index.

curl 127.0.0.1:9200/_plugins/_sm/policies
{"error":{"root_cause":[{"type":"status_exception","reason":"Snapshot management config index not found"}],"type":"status_exception","reason":"Snapshot management config index not found"},"status":404}

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

  1. Install Opensearch with index-management plugin
  2. After the cluster is ready (healthy), run the above mentioned GET cmds to list ism and sm policies.
  3. See error while listing sm policies.

What is the expected behavior?
Like ism policies, even the sm api could respond with an empty list, instead of an exception.

What is your host/environment?

  • OS: Windows 10
  • Version 2.8 (latest branch)
  • Plugins
@aggarwalShivani aggarwalShivani added bug Something isn't working untriaged labels Dec 10, 2023
@aggarwalShivani
Copy link
Contributor Author

Hi
The expectation is consistent behaviour between ism and sm policies. Either both APIs must throw similar exception when the index does not exist, or both should return an empty list.
Request feedback from repo maitainers to decide next steps for this issue,

@aggarwalShivani
Copy link
Contributor Author

Hi,
Request feedback from maintainers on whether the requested change is valid/desirable from the plugin's design, and if yes, I would be interested to pick this item to contribute.

@aggarwalShivani
Copy link
Contributor Author

Hi,
Gentle reminder: Request feedback from maintainers on this issue.
If this change is desirable, I would be interested to start working on the PR. I have already identified a potential fix.

@aggarwalShivani
Copy link
Contributor Author

Hi, I have raised a PR for this change. Request maintainers for review and feedback.

@aggarwalShivani
Copy link
Contributor Author

Issue fixed with #1072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

1 participant