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}}
68
68
# Pass an initial list of hosts to perform discovery when this node is started:
69
69
# The default list of hosts is ["127.0.0.1", "[::1]"]
70
70
#
71
- {%- if all_node_ips %}
71
+ {%- if all_node_ips|length > 4 %}
72
+ {%- if all_node_ips_count|default(2) > 1 %}
72
73
discovery.seed_hosts : {{ all_node_ips }}
73
74
# Prevent split brain by specifying the initial master nodes.
74
- {%- if all_node_names is defined %}
75
+ {%- if all_node_names is defined %}
75
76
cluster.initial_master_nodes : {{ all_node_names }}
76
- {%- else %}
77
+ {%- else %}
77
78
cluster.initial_master_nodes : {{ all_node_ips }}
79
+ {%- endif %}
80
+ {%- else %}
81
+ discovery.type : single-node
78
82
{%- endif %}
79
83
{%- else %}
80
84
# discovery.seed_hosts: ["host1", "host2"]
You can’t perform that action at this time.
0 commit comments