Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: pointing to ES 7.17 rolling upgrade step since "current" 8.x instructions have moved.

Be aware that whenever any ES nodes go down, for whatever reason, Elasticsearch will immediately begin begins regenerating metadata (reallocating those shards) when an ES node becomes unresponsive. In controlled situations such as a rolling restart, you steps can take steps be taken to minimize the impact.

A rolling restart of your the ES cluster (keeping it operational while taking nodes offline one at a time) might may be needed to upgrade the Elasticsearch version or to do perform maintenance on the server itself ( such as an OS update or hardware change). This process keeps the cluster operational while taking nodes offline one at a time. Because Elasticsearch wants prefers to keep data fully replicated and evenly balanced, it must be made to pause rebalancing until the rolling restart is donecompletes.

This pausing is done performed through ES settings changes, as recommended by Elasticsearch in the bolded links below. The essential process is this:

  1. Start maintenance mode by changing the ES settings.

  2. Complete the maintenance work (such as upgrading ES) and rolling restart. 

  3. Stop maintenance mode by restoring the ES settings.

You should follow Follow the steps in the Elasticsearch documentation, with this important addition for versions before Elasticsearch 7:

...

  1. Set the discovery.zen.minimum_master_nodes value in the /etc/elasticsearch/elasticsearch.yml config file to be: (number of master-eligible-nodes/2, rounded down) + 1 when the elasticsearch cluster is first configured.
    Verify

...

  1. the number is smaller than the number of currently available nodes.

...

  1. Run the following command now to set that number to be <current_min_master_nodes>: (current number of master-eligible-nodes/2, rounded down) + 1 if not.

    Code Block
    languagebash
    curl -s -XPUT 'http://ES_NODE:9200/_cluster/settings' \
    	--data-binary '{"transient": {"discovery.zen.minimum_master_nodes" : "<current_min_master_nodes>"}}'
  2. Follow the Elasticsearch rolling restart procedure for

...

  1. the version:

...

...

  1. This step is only needed if using an elasticsearch version before Elasticsearch 7. Reset discovery.zen.minimum_master_nodes to its original value, or adjust it based on the current number of expected available nodes after completing the rolling restart:

    Code Block
    languagebash
    curl -s -XPUT 'http://ES_NODE:9200/_cluster/settings' \
    	--data-binary '{"transient": {"discovery.zen.minimum_master_nodes" : "<original_min_master_nodes>"}}'