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

Check for index blocks against concrete indices on master operations #6694

Closed
javanna opened this issue Jul 2, 2014 · 0 comments
Closed
Assignees
Labels
>bug :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. v1.3.0 v2.0.0-beta1

Comments

@javanna
Copy link
Member

javanna commented Jul 2, 2014

Some master operations require to check for index blocks, done by overriding TransportMasterNodeOperationAction#checkBlock. We need to make sure though that the check is done against concrete indices, otherwise we might not get blocks back altough there are.

For instance you can currently delete a read-only index using an alias that points to it, or using the _all alias:

curl -XPUT localhost:9200/foo

curl -XPUT 'localhost:9200/foo/_settings' -d '
{
    "index" : {
        "blocks.read_only" : true
    } }
'

curl -XDELETE localhost:9200/foo
#{"error":"ClusterBlockException[blocked by: [FORBIDDEN/5/index read-only (api)];]","status":403}

curl -XDELETE localhost:9200/_all
#{"acknowledged":true}

The problem seems to affect the following apis:

  • delete index
  • delete mapping
  • types exists
  • indices exists
  • open index
  • close index
@javanna javanna added the bug label Jul 2, 2014
@javanna javanna self-assigned this Jul 2, 2014
javanna added a commit to javanna/elasticsearch that referenced this issue Jul 8, 2014
…crete ones, and make sure check blocks is executed on concrete indices

Concrete indices is now called multiple times when needed instead of changing what's inside the incoming request with the concrete indices. Ideally we want to keep the original aliases or indices or wildcard expressions in the request.

Also made sure that the check blocks is done against the concrete indices, which wasn't the case for delete index, delete mapping, open index, close index, types exists and indices exists.

Closes elastic#6694
Closes elastic#6777
javanna added a commit that referenced this issue Jul 8, 2014
…e ones, and make sure check blocks is executed on concrete indices

Concrete indices is now called multiple times when needed instead of changing what's inside the incoming request with the concrete indices. Ideally we want to keep the original aliases or indices or wildcard expressions in the request.

Also made sure that the check blocks is done against the concrete indices, which wasn't the case for delete index, delete mapping, open index, close index, types exists and indices exists.

Closes #6694
Closes #6777
@javanna javanna closed this as completed in 8dedbd0 Jul 8, 2014
@clintongormley clintongormley changed the title Check for index blocks against concrete indices on master operations Internal: Check for index blocks against concrete indices on master operations Jul 16, 2014
@clintongormley clintongormley changed the title Internal: Check for index blocks against concrete indices on master operations Check for index blocks against concrete indices on master operations Jun 7, 2015
@clintongormley clintongormley added :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. and removed :Cluster labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. v1.3.0 v2.0.0-beta1
Projects
None yet
Development

No branches or pull requests

2 participants