I'm experimenting with a cluster of two master-eligible nodes (node30, node207) and I noticed that master re-election process doesn't start unless I restart the non-master node.
Below is my node elasticsearch.yml (the second node - node207 - has a similar one, with a different node.name only):
network.host: 0.0.0.0
cluster.name: mycluster
node.name: node30
discovery.zen.no_master_block: all
discovery.zen.ping.unicast.hosts: ["node30", "node207"]
Here's my scenario:
- Start both nodes and node30 becomes a master node. Cluster health shows two nodes in a cluster.
Disable TCP ports 9200/9300 on node207. There are networking errors in node207 logs. No master is visible.
According to documentation - https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-discovery-zen.html - after 3 retries (ping_retries) node207 should elect itself as the new master (discovery.zen.minimum_master_nodes is 1 by default). This never happens.
Restart node207. After several failed attempts to ping the old master (node30), it will elect itself as a master.
Without restarting, master re-election is not happening.
Is it expected behavior?