Persistent Cluster Update Settings not work

Hi.

I have a question about "Cluster Update Settings" in the reference:
https://www.elastic.co/guide/en/elasticsearch/reference/5.3/cluster-update-settings.html

I create a 2-node cluster and write some data into it. The shards of index is distributed across two nodes.
Then I put a persistent setting to the cluster to exclude one node.

curl -XPUT http://1.1.1.1:18437/_cluster/settings?pretty -d '
{
  "persistent" : {
    "cluster.routing.allocation.exclude._ip": "1.1.1.1"
  }
}'

It doesn't work, and the shards of node 1.1.1.1 are still there and not reallocated.
When I put the following transient setting, it works:

curl -XPUT http://1.1.1.1:18437/_cluster/settings?pretty -d '
{
  "transient" : {
    "cluster.routing.allocation.exclude._ip": "1.1.1.1"
  }
}'

I am afraid of losing my settings in case the whole cluster restart, so I want to put my settings in persistent module. why doesn't persistent cluster setting working like transient settings?

my elasticsearch version is 5.0.0

Any help would be appreciated!

That is bad, please see Important Configuration Changes | Elasticsearch: The Definitive Guide [2.x] | Elastic

What's the point of putting that in as persistent? If you want there to be no shards on that node, do a transient setting and then remove the node entirely/

We create a 2-node cluster just for testing. In production environment, we have more nodes.

I'm worrying that the setting is lost when the whole cluster restart. BTW, why persistent setting not work?

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