Skip to content

Commit

Permalink
Use node name to specify initial master nodes
Browse files Browse the repository at this point in the history
With this commit we use the Elasticsearch node name instead of its IP to
configure `cluster.initial_master_nodes`. This avoids any ambiguity in
case multiple nodes are configured per host. For backwards-compatibility
we fallback to previous behavior if the template variable
`all_node_names` is undefined.

Relates elastic/rally#804
  • Loading branch information
danielmitterdorfer committed Oct 28, 2019
1 parent f2c90e2 commit d35f4f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cars/v1/vanilla/templates/config/elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ transport.port: {{transport_port}}
{%- if all_node_ips %}
discovery.seed_hosts: {{ all_node_ips }}
# Prevent split brain by specifying the initial master nodes.
{%- if all_node_names is defined %}
cluster.initial_master_nodes: {{ all_node_names }}
{%- else %}
cluster.initial_master_nodes: {{ all_node_ips }}
{%- endif %}
{%- else %}
#discovery.seed_hosts: ["host1", "host2"]
#cluster.initial_master_nodes: ["node-name1", "node-name2"]
Expand Down

0 comments on commit d35f4f5

Please sign in to comment.