# Not forced awareness

**URL:** <https://discuss.elastic.co/t/not-forced-awareness/78880>\
**Category:** Elasticsearch\
**Created:** [March 16, 2017, 2:45pm UTC](https://discuss.elastic.co/t/not-forced-awareness/78880 "2017-03-16T14:45:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![theundefined](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theundefined/32/16418_2.png) [@theundefined](https://discuss.elastic.co/u/theundefined)\
**Post date:** [March 16, 2017, 2:45pm UTC](https://discuss.elastic.co/t/not-forced-awareness/78880/1 "2017-03-16T14:45:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [March 17, 2017, 9:01am UTC](https://discuss.elastic.co/t/not-forced-awareness/78880/2 "2017-03-17T09:01:23Z")

</div>

- Are there any other nodes beside these 3?
- Can you run the [`reroute` command](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/cluster-reroute.html) (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?

---

<div class="post-metadata">

**Author:** ![theundefined](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theundefined/32/16418_2.png) [@theundefined](https://discuss.elastic.co/u/theundefined)\
**Post date:** [March 17, 2017, 11:39am UTC](https://discuss.elastic.co/t/not-forced-awareness/78880/3 "2017-03-17T11:39:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [March 17, 2017, 12:37pm UTC](https://discuss.elastic.co/t/not-forced-awareness/78880/4 "2017-03-17T12:37:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![theundefined](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theundefined/32/16418_2.png) [@theundefined](https://discuss.elastic.co/u/theundefined)\
**Post date:** [March 20, 2017, 9:26am UTC](https://discuss.elastic.co/t/not-forced-awareness/78880/5 "2017-03-20T09:26:41Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [March 20, 2017, 10:25am UTC](https://discuss.elastic.co/t/not-forced-awareness/78880/6 "2017-03-20T10:25:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 17, 2017, 10:25am UTC](https://discuss.elastic.co/t/not-forced-awareness/78880/7 "2017-04-17T10:25:46Z")

</div>

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