Cluster.routing.allocation.awareness.attributes doesn't seem to work

Hi Team,

cluster.routing.allocation.awareness.attributes: 34

And I have 2 VMs with this same value. prd-es107.com and prd-es108.com. Both has 34.

I have almost 86 nodes in my cluster.

Below is the shard allocation I get.
table-05-4-2020 4 p STARTED 3800928 5gb 10.2.0.7 prd-es107.com
table-05-4-2020 4 r STARTED 3800928 5gb 10.2.0.8 prd-es108.com

The shards of same name and number should be allocated to a different cluster.routing.allocation.awareness.attributes value and not to same 34 .

Correct me if my understanding or variable setting is wrong.

Regards,
Mannoj Kumar

Do the other nodes have attributes set?

How do s your shard allocation awareness configured?

yes, all nodes.

Just with this setting. Nothing else.
cluster.routing.allocation.awareness.attributes: 34

It does not sound like you have configured it correctly. Have a look at the docs for examples.

Should it be like this ?

node.attr.rack_id: 34
cluster.routing.allocation.awareness.attributes: rack_id

Yes, I think that looks better.

I made the setting on an existing cluster that has P and R on same BM and I have mentioned like below.

node.attr.rack_id: 028
cluster.routing.allocation.awareness.attributes: rack_id

After this setting did rolling restart on both the nodes, now cluster is green.

But I still see the shard P and R are staying on same BM no change found after change and restarts.

can someone help me here? Or should I have to run a job that keeps moving the shards not to go on same BM? Setting in ES doesn't seems to work.

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