# Upgrading

**URL:** <https://discuss.elastic.co/t/upgrading/13679>\
**Category:** Elasticsearch\
**Created:** [September 18, 2013, 7:12pm UTC](https://discuss.elastic.co/t/upgrading/13679 "2013-09-18T19:12:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [September 18, 2013, 7:12pm UTC](https://discuss.elastic.co/t/upgrading/13679/1 "2013-09-18T19:12:29Z")

</div>

I have a question about upgrading: should you turn off shard reallocation  
before shutting down each server?

I was reading somewhere (but can't find where) that shutting down a node in  
the cluster reassigns all the shards immediately and then bringing the node  
back up causes another flurry of reassignments. This is the behaviour I  
see.

If I turn off shard reallocation before shutting down the server, upgrade,  
restart, then turn on shard reallocation, then I see the shards basically  
snap back to their old server and the whole process seems to proceed much  
more quickly.

So, is this how I should do a rolling upgrade? If so, should I work on  
building such a thing into the deb package, shutdown api, or something else?

Nik

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [September 20, 2013, 8:34am UTC](https://discuss.elastic.co/t/upgrading/13679/2 "2013-09-20T08:34:55Z")

</div>

During an upgrade I would also disable automatic shard allocation during an  
upgrade in order to prevent behaviour that you're describing. I don't know  
much about deb packages, but if that automates that process (disable before  
upgrade and enable after) I think that would be a good idea.

On 18 September 2013 21:12, Nikolas Everett [nik9000@gmail.com](mailto:nik9000@gmail.com) wrote:

> I have a question about upgrading: should you turn off shard reallocation  
> before shutting down each server?
> 
> I was reading somewhere (but can't find where) that shutting down a node  
> in the cluster reassigns all the shards immediately and then bringing the  
> node back up causes another flurry of reassignments. This is the behaviour  
> I see.
> 
> If I turn off shard reallocation before shutting down the server, upgrade,  
> restart, then turn on shard reallocation, then I see the shards basically  
> snap back to their old server and the whole process seems to proceed much  
> more quickly.
> 
> So, is this how I should do a rolling upgrade? If so, should I work on  
> building such a thing into the deb package, shutdown api, or something else?
> 
> Nik
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Met vriendelijke groet,

Martijn van Groningen

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:15am UTC](https://discuss.elastic.co/t/upgrading/13679/3 "2017-07-06T02:15:23Z")

</div>


