I've come up with what I think is a safe way to rolling restart an
Elasticsearch cluster using Ansible handlers.
Why is this needed?
Even if you use a serial setting to limit the number of nodes processed
at one time, Ansible will restart elasticsearch nodes and continue
processing as soon as the elasticsearch service restart reports itself
complete. This pushes the cluster into a red state due to muliple data
nodes being restarted at once, and can cause performance problems.
Solution:
Perform a rolling restart of each elasticsearch node and wait for the
cluster to stabilize before continuing processing nodes. This set of
chained handlers restarts each node while keeping the cluster from
thrashing on reallocating shards during the process.
A gist of the handlers/main.yml file for my Elasticsearch role is at
I welcome any comments and/or suggestions.
--[Lance]
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ed35d8af7b9fb038b5b821b855ad75ba%40webmail.bearcircle.net.
For more options, visit https://groups.google.com/d/optout.