File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
cars/v1/vanilla/templates/config Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -68,13 +68,17 @@ transport.port: {{transport_port}}
6868# Pass an initial list of hosts to perform discovery when this node is started:
6969# The default list of hosts is ["127.0.0.1", "[::1]"]
7070#
71- {%- if all_node_ips %}
71+ {%- if all_node_ips|length > 4 %}
72+ {%- if all_node_ips_count|default(2) > 1 %}
7273discovery.seed_hosts : {{ all_node_ips }}
7374# Prevent split brain by specifying the initial master nodes.
74- {%- if all_node_names is defined %}
75+ {%- if all_node_names is defined %}
7576cluster.initial_master_nodes : {{ all_node_names }}
76- {%- else %}
77+ {%- else %}
7778cluster.initial_master_nodes : {{ all_node_ips }}
79+ {%- endif %}
80+ {%- else %}
81+ discovery.type : single-node
7882 {%- endif %}
7983{%- else %}
8084# discovery.seed_hosts: ["host1", "host2"]
You can’t perform that action at this time.
0 commit comments