# Shard allocation for master nodes during rolling upgrades

**URL:** <https://discuss.elastic.co/t/shard-allocation-for-master-nodes-during-rolling-upgrades/206188>\
**Category:** Elasticsearch\
**Created:** [November 1, 2019, 4:08pm UTC](https://discuss.elastic.co/t/shard-allocation-for-master-nodes-during-rolling-upgrades/206188 "2019-11-01T16:08:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandeepkanabar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeepkanabar/32/79399_2.png) [@sandeepkanabar](https://discuss.elastic.co/u/sandeepkanabar)\
**Post date:** [November 1, 2019, 4:08pm UTC](https://discuss.elastic.co/t/shard-allocation-for-master-nodes-during-rolling-upgrades/206188/1 "2019-11-01T16:08:48Z")

</div>

I'm aware that shard allocation needs to be [disabled and then re-enabled back](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/rolling-upgrades.html) during rolling upgrades.

My question is: Does this need to be done for `master` nodes?

I reckon this is only needed for `data` nodes and **NOT** needed for `master nodes`. Can someone confirm? The main purpose of disabling and enabling is to prevent un-necessary movement of shards across nodes but master nodes don't contain any shards in first place.

---

<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:** [November 1, 2019, 4:58pm UTC](https://discuss.elastic.co/t/shard-allocation-for-master-nodes-during-rolling-upgrades/206188/2 "2019-11-01T16:58:49Z")

</div>

Shard allocation is disabled with a cluster-wide setting:

```auto
PUT _cluster/settings
{
  "transient": {
    "cluster.routing.allocation.enable": "none"
  }
}

```

It doesn't make sense to talk about disabling it only on some nodes.

---

<div class="post-metadata">

**Author:** ![sandeepkanabar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeepkanabar/32/79399_2.png) [@sandeepkanabar](https://discuss.elastic.co/u/sandeepkanabar)\
**Post date:** [November 1, 2019, 8:36pm UTC](https://discuss.elastic.co/t/shard-allocation-for-master-nodes-during-rolling-upgrades/206188/3 "2019-11-01T20:36:23Z")

</div>

Hi David,

Thanks for your answer. I am aware it's a `cluster level` setting. The first point of rolling upgrades asks to disable shard allocation and my question was `whether this needs to be done for upgrading/restarting of master nodes`? because a master node doesn't contain any shards in first place and so I was wondering if we can skip disabling and enabling of shard allocation when we are doing rolling upgrade on master nodes. Got my point?

IMHO, the disabling and enabling of shard allocation steps are `moot` for master nodes. Even though the setting is at cluster level, it needs to be done only when restarting/upgrading `data` nodes. This i what I understand and was looking to confirm if my understanding is correct or not.

---

<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:** [November 1, 2019, 9:10pm UTC](https://discuss.elastic.co/t/shard-allocation-for-master-nodes-during-rolling-upgrades/206188/4 "2019-11-01T21:10:18Z")

</div>

I see, sorry, I misunderstood your question. Yes, disabling shard allocation is only really meaningful when restarting a data node.

---

<div class="post-metadata">

**Author:** ![sandeepkanabar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeepkanabar/32/79399_2.png) [@sandeepkanabar](https://discuss.elastic.co/u/sandeepkanabar)\
**Post date:** [November 1, 2019, 9:24pm UTC](https://discuss.elastic.co/t/shard-allocation-for-master-nodes-during-rolling-upgrades/206188/5 "2019-11-01T21:24:52Z")

</div>

Thank you David.

---

<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:** [November 29, 2019, 9:24pm UTC](https://discuss.elastic.co/t/shard-allocation-for-master-nodes-during-rolling-upgrades/206188/6 "2019-11-29T21:24:54Z")

</div>

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