Not forced awareness

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:

node.rack: rack1
cluster.routing.allocation.awareness.attributes: rack

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.

Elasticsearch 2.3.5 if it matter.

  • Are there any other nodes beside these 3?
  • 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?

No - in this environment i have only 3 nodes.

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.

Does it is expected behavoiur?

I asked you to do a reroute with dry_run = true and post the output here. If you don't do that I cannot help you.

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 :slight_smile:

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 :slight_smile:

ok, let me know if the issue reappears. Thanks for reporting back.

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