I am using Ansible to configure the ELK cluster and this includes templating of the elasticsearch.yml configuration file. I want to make discovery.zen.minimum_master_nodes key dependent on the master-eligible nodes in the cluster, to set this value to be a quorum. Given that my master-eligible nodes are members of the "elasticsearch_master" inventory group I came up with this idea:
I think your formula doesn't work if there's an even number of masters.
It's pretty tricky to design an orchestrator to manipulate this setting correctly. You must get it right in the config file, but you must also increase it through the API before adding more master nodes and/or decrease it after removing them. Frankly it's a pain to do this, which is why we've removed it in 7.x. The simplest answer is to upgrade and then you needn't worry any more.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.