Switching 'cluster.routing.allocation' between node-upgrades

We have a three-node cluster onprem, and during rolling upgrade of the individual Elastic-nodes, we tend to toggle 'cluster.routing.allocation.enable' between 'primaries' and null.
Is this necessary to do between each individual node upgrade, or is it enough to set the it to 'primaries' before the upgrade and then back to null after all three nodes are done and online?

If it is: Is it crucial to wait for unsassigned shards to reach 0 before setting .enable to 'primaries' and upgrade the next node?

It takes a noticable time for 'unassigned shards' to reach 0, so it'd be time efficent to just play the wait-game once.

Part of that might come down to if you are using delayed allocation. If you aren't - or your restart takes longer than the configured delay - then you will want to manage allocation and ensure that the primaries are allocated before you restart the next node. Full-cluster restart and rolling restart | Elasticsearch Guide [8.8] | Elastic goes into this.

1 Like

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