Skip to content

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

Open
@pflaquerre-figma

Description

@pflaquerre-figma

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions