Add curl alternatives for ES troubleshooting (#9414)

This commit is contained in:
Michael Kohl 2020-07-21 18:24:28 +07:00 committed by GitHub
parent 47d265f240
commit e3455ef921
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,6 +65,12 @@ Search::Client.cluster.put_settings(body: {
})
```
Alternatively you can use the following command in a terminal session:
```shell
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
```
To disable the "read only" mode to allow operations on the Elasticsearch indexes
you can issue the following command, similary in the Rails console:
@ -77,6 +83,12 @@ Search::Client.indices.get(index: "*").keys.each do |index_name|
end
```
Or alternatively:
```shell
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings -d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
```
If instead you want to tune the Elasticsearch disk allocator's settings, please
refer to
[Disk-based shard allocation](https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html#disk-allocator).