Skip to content

HOWTO restart an elasticsearch cluster

Why do that

For operating system, storage or network maintenance on hypervisor, we recommend stopping only one elasticsearch cluster or the full cluster.

Prerequisites

  • You must contact your level 2 support organisation to tto announce the beginning of the operation.
  • You must have a PunchPlatform operator role
  • You should disable the supervision

This procedure explains the two operations : - restart an elasticsearch node - restart a full cluster

Restart an elasticsearch node

Stop all the elasticsearch output channels

This is mandatory for full cluster restart. Go to the PunchPlatform administrator environment, and list the channel to stop.

Then, stop the listed channel by :

channelctl stop --channel <output_listed_channel>

Disable the routing allocation

Disable the routing allocation (get the <elasticsearch_cluster_url>:<cluster_port> in the punchplatform.properties)

curl -XPUT <elasticsearch_cluster_url>:<cluster_port>/_cluster/settings -d '
 {
     "transient" : {
         "cluster.routing.allocation.enable" : "none"
     }
 }'

Stop all PunchPlatform process on the device

Go on the node, and type:

supervisorctl stop all

Run the maintenance operation

The node is actually out of the punchplatform_cluster, so you can do all operation on this node (including reboot).

After the maintenance operation : restart all PunchPlatform processes

Go on the node, and type:

supervisorctl start all

Enable the routing allocation

Enable the routing allocation (get the <elasticsearch_cluster_url>:<cluster_port> in the punchplatform.properties)

curl -XPUT <elasticsearch_cluster_url>:<cluster_port>/_cluster/settings -d '
 {
     "transient" : {
         "cluster.routing.allocation.enable" : "all"
     }
 }'

Start all elasticsearch output channel

This is mandatory for full cluster restart. Go to the PunchPlatform administrator environment, and list the channel to start.

Then, start the listed channel by :

channelctl start --channel <output_listed_channel>

ReEnable the supervision

Enable the supervision and keep an eye on the platform during 24h. If the behaviour of the platform is not stable 2 hours after the restart, contact the PunchPlatform support at support-n3.punchplatform@thalesgroup.com

Restart the full elasticsearch cluster

Follow the previous steps, just add the following step before stop all PunchPlatform processes :

Close all the indices

Take a look at Curator documentation Before enable the routing allocation, proceed with the closing procedure.

Open indices 15 days per 15 days

Take a look at Curator documentation Before enable the routing allocation, proceed with the opening procedure.