Read only on index prevents getting status

I started to use the new read only feature in ES 0.19.0. After I set some
indices to readOnly, status does not work anymore. Here is a snippet to
reproduce it:

curl -XPUT http://localhost:9200/4f5f157e894cd/ -d '[]'
curl -XPOST http://localhost:9200/_aliases -d
'{"actions":[{"add":{"index":"4f5f157e894cd","alias":"4f5f157e9ec22"}}]}'
curl -XPUT http://localhost:9200/4f5f157e894cd/_settings -d
'{"index":{"blocks.read_only":true}}'
curl -XGET http://localhost:9200/_status

This outputs:

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

As status is only a GET request I would expect it to work.

Hiya Ruflin

On Tue, 2012-03-13 at 02:45 -0700, ruflin wrote:

I started to use the new read only feature in ES 0.19.0. After I set
some indices to readOnly, status does not work anymore. Here is a
snippet to reproduce it:

I think this may be fixed in 0.19.1:

clint

curl -XPUT http://localhost:9200/4f5f157e894cd/ -d ''
curl -XPOST http://localhost:9200/_aliases -d
'{"actions":[{"add":{"index":"4f5f157e894cd","alias":"4f5f157e9ec22"}}]}'
curl -XPUT http://localhost:9200/4f5f157e894cd/_settings -d
'{"index":{"blocks.read_only":true}}'
curl -XGET http://localhost:9200/_status

This outputs:

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

As status is only a GET request I would expect it to work.

Afraid this might still be an issue

After upgrading both ES and Elastica https://github.com/ruflin/Elasticato 0.19.3 I still get the error as above

Cheers,
Philipp

On Tuesday, March 13, 2012 10:57:29 AM UTC+1, Clinton Gormley wrote:

I think this may be fixed in 0.19.1:

Index Blocks: Add index.blocks.write, index.blocks.read, and index.blocks.metadata settings · Issue #1771 · elastic/elasticsearch · GitHub

clint

Setting the index to readonly means you can't issue WRITE and METADATA
(status/stats are METADATA calls). In 0.19.2, you can now explicitly set
blocks to read, write or metadata. See here:

.

On Thu, May 3, 2012 at 1:44 PM, Philipp Gysin philipp.gysin@gmail.comwrote:

Afraid this might still be an issue

After upgrading both ES and Elastica https://github.com/ruflin/Elasticato 0.19.3 I still get the error as above

Cheers,
Philipp

On Tuesday, March 13, 2012 10:57:29 AM UTC+1, Clinton Gormley wrote:

I think this may be fixed in 0.19.1:

https://github.com/**elasticsearch/elasticsearch/**issues/1771https://github.com/elasticsearch/elasticsearch/issues/1771

clint