Skip to content

[BUG] Deleting opensearch_cluster_settings destructively overwrites all settings with defaults #243

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

Open
pflaquerre-figma opened this issue Mar 21, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@pflaquerre-figma
Copy link

pflaquerre-figma commented Mar 21, 2025

What is the bug?

When deleting an opensearch_cluster_settings resource, it destructively clobbers all settings back to defaults:

which goes to this request that wipes all settings:

body := `{
"persistent" : {
"cluster.*": null,
"indices.*": null,
"action.*": null,
"script.*": null,
"network.*": null,
"search.*": null,
"plugins.*": null
}
}`

This means that if someone wants to stop using opensearch_cluster_settings to manage cluster settings for any reason and delete it, they will end up wiping all of their cluster's settings. This is a) extremely surprising and b) ...not great if you were planning on continuing to use that cluster.

Is there a reason why this has to happen at all at delete time? Could that step potentially be removed?

How can one reproduce the bug?

  • Create an OS cluster
  • Tweak any settings manually
  • Add opensearch_cluster_settings
  • Remove opensearch_cluster_settings

What is the expected behavior?

Settings don't change when removing opensearch_cluster_settings.

@peterzhuamazon
Copy link
Member

Hi @prudhvigodithi could you take a look on this?

Thanks.

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

No branches or pull requests

2 participants