Unable to delete index

Experiencing an issue with two indices that were somehow marked as read-only and now I'm unable to remove that restriction. Here is what I have tried and the result:

~]# curl -XPOST 'http://10.48.184.94:9200/lvs-logstash-risk-service-request-2017.08.01/_settings' -d '{ "index.blocks.read_only_allow_delete": "false" }'
{"error":{"root_cause":[{"type":"cluster_block_exception","reason":"blocked by: [FORBIDDEN/5/index read-only (api)];"}],"type":"cluster_block_exception","reason":"blocked by: [FORBIDDEN/5/index read-only (api)];"},"status":403}

This issue is preventing my automatic Curator job from performing a cleanup on all indices alphabetically after this one and might be the cause of a mapping conflict that I'm seeing with this index pattern in Kibana.

Any/all help is greatly appreciated.

What version of Elasticsearch?

Currently it is 5.2.2.

I can't remember which version they fixed this in, but I recall there being a change that allowed you to unset the read-only flag. Older versions (and again, I'm not sure where the cutoff is) did not allow you to unset read-only once set, resulting in an error message like the one you're showing.

Have you tried an outright:

PUT /indexname/_settings
{
  "index.blocks.read_only": false
}

...to set the index back to full read/write capacity?

I have and the result is the same:

~]# curl -XPOST 'http://10.48.184.94:9200/lvs-logstash-risk-service-request-2017.08.01/_settings' -d '{ "index.blocks.read_only": "false" }'
{"error":{"root_cause":[{"type":"cluster_block_exception","reason":"blocked by: [FORBIDDEN/5/index read-only (api)];"}],"type":"cluster_block_exception","reason":"blocked by: [FORBIDDEN/5/index read-only (api)];"},"status":403}

EDIT: Using XPUT instead of XPOST worked!

~]# curl -XPUT 'http://10.48.184.94:9200/lvs-logstash-risk-service-request-2017.08.01/_settings' -d '{ "index.blocks.read_only": "false" }'
{"acknowledged":true}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.