# Allocation awareness - something not right

**URL:** <https://discuss.elastic.co/t/allocation-awareness-something-not-right/184616>\
**Category:** Elasticsearch\
**Created:** [June 6, 2019, 3:09pm UTC](https://discuss.elastic.co/t/allocation-awareness-something-not-right/184616 "2019-06-06T15:09:20Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [June 7, 2019, 11:09am UTC](https://discuss.elastic.co/t/allocation-awareness-something-not-right/184616/21 "2019-06-07T11:09:29Z")

</div>

Agreed. A PR to emphasise _which_ `elasticsearch.yml` file we're talking about throughout that page would be very welcome.

---

<div class="post-metadata">

**Author:** ![john275](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@john275](https://discuss.elastic.co/u/john275)\
**Post date:** [June 7, 2019, 11:14am UTC](https://discuss.elastic.co/t/allocation-awareness-something-not-right/184616/22 "2019-06-07T11:14:03Z")

</div>

Well I originally had a more complex compound routing awareness, but that didn't work (no surprise, now I understand that the master nodes DO require some config) and switched to this simpler form, but when I was looking at the documentation I did find it ambiguous WRT compound routing awareness would work or not, perhaps that could/should also be reviewed.

Thanks both for your help, I'll confirm next week all good

---

<div class="post-metadata">

**Author:** ![john275](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@john275](https://discuss.elastic.co/u/john275)\
**Post date:** [June 7, 2019, 3:08pm UTC](https://discuss.elastic.co/t/allocation-awareness-something-not-right/184616/23 "2019-06-07T15:08:56Z")

</div>

... well I got chance to do it today....

Early signs are good and the network is going nuts as I'd expect.

---

<div class="post-metadata">

**Author:** ![john275](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@john275](https://discuss.elastic.co/u/john275)\
**Post date:** [June 7, 2019, 3:38pm UTC](https://discuss.elastic.co/t/allocation-awareness-something-not-right/184616/24 "2019-06-07T15:38:14Z")

</div>

So to get rack awareness for my cluster, I am hoping this will work:

Add:

cluster.routing.allocation.awareness.attributes: rackid cluster.routing.allocation.awareness.force.roomid.values: rack1,rack2

to master nodes

and

node.attr.rackid

to data nodes.

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [June 10, 2019, 9:54am UTC](https://discuss.elastic.co/t/allocation-awareness-something-not-right/184616/25 "2019-06-10T09:54:06Z")

</div>

rackid? roomid?

---

<div class="post-metadata">

**Author:** ![john275](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@john275](https://discuss.elastic.co/u/john275)\
**Post date:** [June 10, 2019, 10:28am UTC](https://discuss.elastic.co/t/allocation-awareness-something-not-right/184616/26 "2019-06-10T10:28:47Z")

</div>

```
So I added extended allocation awareness, goal changed from replica in other room to include any multiple replicas in a different rack.

Masters now have the awareness routing:
======= master1 =======
cluster.routing.allocation.awareness.attributes:
- roomid
- rackid
cluster.routing.allocation.awareness.force.rackid.values: 1-rack1,1-rack2,2-rack1,2-rack2
cluster.routing.allocation.awareness.force.roomid.values: 1,2
=======================
======= master2 =======
cluster.routing.allocation.awareness.attributes:
- roomid
- rackid
cluster.routing.allocation.awareness.force.rackid.values: 1-rack1,1-rack2,2-rack1,2-rack2
cluster.routing.allocation.awareness.force.roomid.values: 1,2
=======================
======= master3 =======
cluster.routing.allocation.awareness.attributes:
- roomid
- rackid
cluster.routing.allocation.awareness.force.rackid.values: 1-rack1,1-rack2,2-rack1,2-rack2
cluster.routing.allocation.awareness.force.roomid.values: 1,2
=======================
Data nodes have Node attributes:

======= node1 =======
node.attr.rackid: 1-rack1
node.attr.roomid: 1
=======================
======= node2 =======
node.attr.rackid: 2-rack1
node.attr.roomid: 2
=======================
======= node3 =======
node.attr.rackid: 1-rack2
node.attr.roomid: 1
=======================
======= node4 =======
node.attr.rackid: 2-rack2
node.attr.roomid: 2
=======================
======= node5 =======
node.attr.rackid: 1-rack1
node.attr.roomid: 1
=======================
======= node6 =======
node.attr.rackid: 2-rack1
node.attr.roomid: 2
=======================
======= node7 =======
node.attr.rackid: 1-rack2
node.attr.roomid: 1
=======================
======= node8 =======
node.attr.rackid: 2-rack2
node.attr.roomid: 2
=======================

All looks good, thank you David and Martin.
```

---

<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:** [July 8, 2019, 10:28am UTC](https://discuss.elastic.co/t/allocation-awareness-something-not-right/184616/27 "2019-07-08T10:28:47Z")

</div>

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

[Previous page](https://discuss.elastic.co/t/allocation-awareness-something-not-right/184616.md?page=1)
