# How to recover after bad rolling upgrade

**URL:** <https://discuss.elastic.co/t/how-to-recover-after-bad-rolling-upgrade/224466>\
**Category:** Elasticsearch\
**Created:** [March 20, 2020, 6:10pm UTC](https://discuss.elastic.co/t/how-to-recover-after-bad-rolling-upgrade/224466 "2020-03-20T18:10:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Jackson1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_jackson1/32/64821_2.png) [@Michael\_Jackson1](https://discuss.elastic.co/u/Michael_Jackson1)\
**Post date:** [March 20, 2020, 6:10pm UTC](https://discuss.elastic.co/t/how-to-recover-after-bad-rolling-upgrade/224466/1 "2020-03-20T18:10:23Z")

</div>

I was following the rolling upgrade documentation and the first node I was trying to upgrade from 7.3 to 7.6 didn't upgrade. It still shows that I am on 7.3 and now my cluster health shows `red`.

Now I am seeing:

```auto
.kibana_task_manager 0 p UNASSIGNED CLUSTER_RECOVERED
.kibana_task_manager 0 r UNASSIGNED CLUSTER_RECOVERED

```

Running:

```auto
GET /_cluster/allocation/explain

```

Returns:

```auto
{
  "index" : ".kibana_task_manager",
  "shard" : 0,
  "primary" : true,
  "current_state" : "unassigned",
  "unassigned_info" : {
    "reason" : "CLUSTER_RECOVERED",
    "at" : "2020-03-20T06:29:05.386Z",
    "last_allocation_status" : "no_valid_shard_copy"
  },
  "can_allocate" : "no_valid_shard_copy",
  "allocate_explanation" : "cannot allocate because all found copies of the shard are either stale or corrupt",
  "node_allocation_decisions" : [
    {
      "node_id" : "GLPJmH7-SBKATglJ4iu1IA",
      "node_name" : "node_01",
      "transport_address" : "XXX.XXX.XXX.XXX:9300",
      "node_attributes" : {
        "ml.machine_memory" : "8363737088",
        "ml.max_open_jobs" : "20",
        "xpack.installed" : "true"
      },
      "node_decision" : "no",
      "store" : {
        "in_sync" : false,
        "allocation_id" : "CM-Un5daQOWv_CzekU0bRA"
      }
    },
    {
      "node_id" : "ZAKTP504TnujdrIM___Ljg",
      "node_name" : "node_02",
      "transport_address" : "XXX.XXX.XXX.XXX:9300",
      "node_attributes" : {
        "ml.machine_memory" : "8363724800",
        "ml.max_open_jobs" : "20",
        "xpack.installed" : "true"
      },
      "node_decision" : "no",
      "store" : {
        "found" : false
      }
    }
  ]
}

```

I have read some solutions, but am a little scared to start trying things. Any help or advice would be greatly appreciated.

---

<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:** [March 20, 2020, 6:19pm UTC](https://discuss.elastic.co/t/how-to-recover-after-bad-rolling-upgrade/224466/2 "2020-03-20T18:19:05Z")

</div>

Have you completed the upgrade? One of your nodes has a stale copy of this shard and the other has no copy at all, which indicates that there's another node out there that has the good copy of this shard.

---

<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:** [March 20, 2020, 6:20pm UTC](https://discuss.elastic.co/t/how-to-recover-after-bad-rolling-upgrade/224466/3 "2020-03-20T18:20:39Z")

</div>

Wait, `CLUSTER_RECOVERED` means that this cluster has experienced a full cluster restart, i.e. you restarted the master nodes. That doesn't happen in a rolling upgrade.

---

<div class="post-metadata">

**Author:** ![Michael\_Jackson1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_jackson1/32/64821_2.png) [@Michael\_Jackson1](https://discuss.elastic.co/u/Michael_Jackson1)\
**Post date:** [March 20, 2020, 6:22pm UTC](https://discuss.elastic.co/t/how-to-recover-after-bad-rolling-upgrade/224466/4 "2020-03-20T18:22:42Z")

</div>

I stopped after seeing the `RED` status and started googling to see if I could find out why my node never recovered after restarting it. I did turn the cluster off last night and turned it back on this morning. I am just running it on a couple vm's.

---

<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:** [March 20, 2020, 7:05pm UTC](https://discuss.elastic.co/t/how-to-recover-after-bad-rolling-upgrade/224466/5 "2020-03-20T19:05:45Z")

</div>

Ok, you are in the situation described in the **IMPORTANT** note at the bottom of the rolling upgrade instructions:

> If you stop half or more of the master-eligible nodes all at once during the upgrade then the cluster will become unavailable, meaning that the upgrade is no longer a _rolling_ upgrade. If this happens, you should upgrade and restart all of the stopped master-eligible nodes to allow the cluster to form again, as if performing a [full-cluster restart upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/current/restart-upgrade.html). It may also be necessary to upgrade all of the remaining old nodes before they can join the cluster after it re-forms.

---

<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, 2020, 7:05pm UTC](https://discuss.elastic.co/t/how-to-recover-after-bad-rolling-upgrade/224466/6 "2020-04-17T19:05:45Z")

</div>

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