geerlingguy / ansible-role-elasticsearch

Ansible Role - Elasticsearch
https://galaxy.ansible.com/geerlingguy/elasticsearch/
MIT License
185 stars 209 forks source link

Add initial_master_nodes #49

Closed in0rdr closed 4 years ago

in0rdr commented 5 years ago

Elasticsearch 7.x comes with new parameters for discovery of cluster nodes: https://www.elastic.co/guide/en/elasticsearch/reference/current/discovery-settings.html

If network.host: 0.0.0.0 is set, Elasticsearch will not start without setting initial_master_nodes as well:

#/etc/elasticsearch/elasticsearch.yml
cluster.initial_master_nodes:
  - "elastic0"

If this is not the case, Elasticsearch will fail to start with the following message:

[2019-07-03T14:23:13,130][ERROR][o.e.b.Bootstrap          ] [elastic0] node validation exception
[1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

I did not check on the other parameters, seed_hosts or seed_providers. Probably they could be implemented in the same "task". However, a single-node Elasticsearch bootstraps fine by defining initial_master_nodes only.

in0rdr commented 5 years ago

This could be resolved with https://github.com/geerlingguy/ansible-role-elasticsearch/issues/38 as well, because it concerns "append only" arguments for newer versions of Elasticsearch

dale-c-anderson commented 4 years ago

@in0rdr , agreed - https://github.com/geerlingguy/ansible-role-elasticsearch/issues/38 was a great suggestion. Simple and effective.

Pull request has been submitted https://github.com/geerlingguy/ansible-role-elasticsearch/pull/54

stale[bot] commented 4 years ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] commented 4 years ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.