Hi!
I play with awareness. I have 2 racks: rack1 and rack2.
In rack1 i have 2 elastic nodes(rack1-node1 and rack1-node2), in rack2 i have 1 elastic node(rack2-node1).
I've configured on rack1-node1 and rack1-node2:
and on rack2-node1:
node.rack: rack2
cluster.routing.allocation.awareness.attributes: rack
I've created indexes with number_of_replicas: 1
When rack2-node1 is up - everything works ok. Shards are distributed between rack1-node1 and rack2-node2 with moving them to worked node.
But - when i put rack2-node1 down - shards stay without replicas - even if they can have replica on secondary node in rack1.
What can i do wrong? From documentation i understood that this behaviour can be caused by cluster.routing.allocation.awareness.force - but i don't use that.
Can you run the reroute command (with dry_run=true) to see what would happen if the system were to allocate one of the unassigned replicas to one of the two nodes on rack1 and post the output here?
hm... when i manually did reroute command (without dry_run=true) - it reroutes indexes and cluster goes to green state.
When i up node rack2-node1 - elastic automagicly reroutes indexes to put there replicas. But when i down it - it still doesnt fix up. Manual reroute fixes it.
Hm... It seems to work. I can't reproduce it anymore. After stopping rack2-node1 and waiting some time it move shards into working nodes. So - it work like in documentation
I don't know why it doesn't work week ago - it's test cluster, maybe i disabled something some time ago and reroute fixed it.
So - thank you for help and sorry for the hassle
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.