I have a cluster of 3 big physical machines (i.e. with a lot of RAM) so I'm hosting multiple nodes on each physical host.
So, I define a node attribute named
shard_allocation on each node whose value is the hostname of the physical machine :
Then I set
cluster.routing.allocation.awareness.attributes: shard_allocation so that the cluster prefers to put the same shards on different hosts (to be resilient to the crash of a physical machine)
Note: I cannot use
cluster.routing.allocation.same_shard.host: true because nodes on one particular node have the value
<hostname>_<nodename> instead of
For a particular use cases, I want that all the shards of a specific index are available on every nodes.
So I set its replica factor to
(number to the number of hosts - 1).
However, some shards stay unassigned.
https://<host>:9200/_cluster/allocation/explain endpoint, I get this error message:
"there are too many copies of the shard allocated to nodes with attribute [shard_allocation], there are  total configured shard copies for this shard id and  total attribute values, expected the allocated shard count per attribute  to be less than or equal to the upper bound of the required number of shards per attribute "
- do you know if it's possible to disable
cluster.routing.allocation.awareness.attributesfor a specific index?
- do you have any suggestion to solve this issue?
Reducing the number of replicas is not a solution because I want the index be present on each node.