# Unassigned shards during upgrade

**URL:** <https://discuss.elastic.co/t/unassigned-shards-during-upgrade/93051>\
**Category:** Elasticsearch\
**Created:** [July 13, 2017, 3:34pm UTC](https://discuss.elastic.co/t/unassigned-shards-during-upgrade/93051 "2017-07-13T15:34:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![axelfelix](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@axelfelix](https://discuss.elastic.co/u/axelfelix)\
**Post date:** [July 13, 2017, 3:34pm UTC](https://discuss.elastic.co/t/unassigned-shards-during-upgrade/93051/1 "2017-07-13T15:34:04Z")

</div>

Hi all,

I peformed an upgrade from ES 5.0.1 to 5.5. Each time I reloaded a node it tooks a long time (hours) to realocate unassigned shards !

I tried to avoid it with the commands below:

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

```

and

```
PUT _all/_settings
{
  "settings": {
    "index.unassigned.node_left.delayed_timeout": "5m"
  }
}

```

But it didn't change anything. It still tooks a long time.

There is any possibility to avoid the unassigned shards and perform an upgrade in a faster way ?

Thanks in advance,  
Alex

---

<div class="post-metadata">

**Author:** ![bleskes](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bleskes](https://discuss.elastic.co/u/bleskes)\
**Post date:** [July 21, 2017, 6:28am UTC](https://discuss.elastic.co/t/unassigned-shards-during-upgrade/93051/2 "2017-07-21T06:28:42Z")

</div>

I suspect shard had to be resynced which may cause large file copies. Have you read and followed the procedure described in [https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html) ?

---

<div class="post-metadata">

**Author:** ![axelfelix](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@axelfelix](https://discuss.elastic.co/u/axelfelix)\
**Post date:** [July 21, 2017, 8:35am UTC](https://discuss.elastic.co/t/unassigned-shards-during-upgrade/93051/3 "2017-07-21T08:35:19Z")

</div>

Hi,

Thanks for your answer. Yes I did it.

---

<div class="post-metadata">

**Author:** ![bleskes](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bleskes](https://discuss.elastic.co/u/bleskes)\
**Post date:** [July 22, 2017, 7:58am UTC](https://discuss.elastic.co/t/unassigned-shards-during-upgrade/93051/4 "2017-07-22T07:58:16Z")

</div>

OK. Did you validate that the synced flush was successful and did you make sure indexing was stopped? (it invalidates the synced flush)

---

<div class="post-metadata">

**Author:** ![axelfelix](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@axelfelix](https://discuss.elastic.co/u/axelfelix)\
**Post date:** [July 24, 2017, 7:56am UTC](https://discuss.elastic.co/t/unassigned-shards-during-upgrade/93051/5 "2017-07-24T07:56:12Z")

</div>

Hello,

I tried this also, but it doesn't change anything.  
In my comprehension, the point here is the option bellow:

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

```

and

```
PUT _all/_settings
{
  "settings": {
    "index.unassigned.node_left.delayed_timeout": "5m"
  }
}

```

But I don't get why it doesn't work for me, and I get a lot of unassigned shards.

---

<div class="post-metadata">

**Author:** ![bleskes](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bleskes](https://discuss.elastic.co/u/bleskes)\
**Post date:** [July 24, 2017, 9:51am UTC](https://discuss.elastic.co/t/unassigned-shards-during-upgrade/93051/6 "2017-07-24T09:51:36Z")

</div>

> I get a lot of unassigned shards.

Can you clarify what you mean exactly? I understood some shards are assigned and take a long time to initialize.

You mention two commands, but I presume you did more than just those two. Can you post a complete description of the procedure you followed?

---

<div class="post-metadata">

**Author:** ![axelfelix](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@axelfelix](https://discuss.elastic.co/u/axelfelix)\
**Post date:** [July 24, 2017, 1:30pm UTC](https://discuss.elastic.co/t/unassigned-shards-during-upgrade/93051/7 "2017-07-24T13:30:13Z")

</div>

I followed the procedure describe here:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html)

---

<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:** [August 21, 2017, 1:30pm UTC](https://discuss.elastic.co/t/unassigned-shards-during-upgrade/93051/8 "2017-08-21T13:30:36Z")

</div>

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