I was working with the version 6.4 of elasticsearch, I always have had two nodes, in that version when the node A got down, the node B automatically took the master role.
I just upgrade to the 7.5.2 version, I would like to know whether in this version the master node selection only occurs one time (in the very beginning of the cluster). when I turn off my master node, it seems like the other one is not able to give any information about the cluster (HEALTH, NODES), but it works.
Can somebody explain it to me, how the master node selection works in version 7.5.2?
The behaviour you describe in version 6.4 indicates that your cluster is incorrectly configured and does not have minimum_master_nodes set to 2 as it should if you have 2 master eligible nodes in the cluster. See the docs for more information.
In order to create a cluster that can handle the loss of a master eligible node and still be available you require a minimum of 3 master eligible nodes in the cluster. 2 nodes is not sufficient as a strict majority of master eligible nodes is required and the majority of 2 is 2.
Version 7 has improved protection against this type of misconfiguration which can lead to split brain scenarios and data loss and enforces the correct behaviour.
Hey Christian! thanks in advance for your response.
So, if I want to have another master node available if the current is down, what I have to do is basically create a new master-elegible node and specify it in the cluster.initial_master_nodes.
That is clear, but I have the last question, Do I need to add this config in all my master-elegible nodes?
EG:
This is not possible. When a new node starts up it has to get the current state of the cluster from another master node that's currently running.
This setting is ignored once the cluster has started up for the first time. You should never change it, but you can safely delete it once the cluster has started up.
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.