ruflin_2
(ruflin-2)
March 13, 2012, 9:45am
1
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:
opened 07:54PM - 08 Mar 12 UTC
closed 07:56PM - 08 Mar 12 UTC
>feature
v0.20.0.RC1
v0.19.1
Allow to specifically block (on an index level) write operations, read operation… s and metadata operations. Setting `index.blocks.write` to `true` will block write operations, setting it back to `false` will allow them. The settings can be dynamically set using the index update settings API.
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/Elastica to 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
kimchy
(Shay Banon)
May 4, 2012, 1:16pm
4
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:
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
.
On Thu, May 3, 2012 at 1:44 PM, Philipp Gysin philipp.gysin@gmail.com wrote:
Afraid this might still be an issue
After upgrading both ES and Elastica https://github.com/ruflin/Elastica to 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/1771 https://github.com/elasticsearch/elasticsearch/issues/1771
clint