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

Confusing blocks.read_only behavior for index write blocking #83305

Closed
matschaffer opened this issue Jan 31, 2022 · 2 comments
Closed

Confusing blocks.read_only behavior for index write blocking #83305

matschaffer opened this issue Jan 31, 2022 · 2 comments
Labels
>bug needs:triage Requires assignment of a team area label

Comments

@matschaffer
Copy link
Contributor

Elasticsearch Version

8.0 branch - 655669b

Installed Plugins

No response

Java Version

bundled

OS Version

macos

Problem Description

If set blocks.read_only on an index to true, attempting to set it back to false fails due to FORBIDDEN/5/index read-only (api)

Steps to Reproduce

POST stuff/_doc
{ "some": "stuff" }

PUT stuff/_settings
{
  "blocks.read_only": true
}

PUT stuff/_settings
{
  "blocks.read_only": false
}

Logs (if relevant)

Screen Shot 2022-01-31 at 12 39 22

@matschaffer
Copy link
Contributor Author

matschaffer commented Jan 31, 2022

Ahh.... Looks like you can use a more complete setting specification for this (found on https://stackoverflow.com/a/50954055/69002):

PUT stuff/_settings
{
 "index.blocks.read_only": null
}

Still kind of surprising that we wouldn't allow setting it to false, simply inverting the flag used to make the index readonly.

Or maybe require a fully specified index.blocks.read_only: true to set it in the first place.

@matschaffer matschaffer changed the title Unable to remove index write block blocks.read_only: true allowed, but not blocks.read_only: false - setting required only for removal Jan 31, 2022
@matschaffer matschaffer changed the title blocks.read_only: true allowed, but not blocks.read_only: false - setting required only for removal Confusing blocks.read_only behavior for index write blocking Jan 31, 2022
@DaveCTurner
Copy link
Contributor

Definitely a bug, but this is already tracked at #48325 so I'm closing this as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug needs:triage Requires assignment of a team area label
Projects
None yet
Development

No branches or pull requests

3 participants