# Discovery.seed\_hosts and cluster.initial\_master\_nodes

**URL:** <https://discuss.elastic.co/t/discovery-seed-hosts-and-cluster-initial-master-nodes/330945>\
**Category:** Elasticsearch\
**Created:** [April 27, 2023, 11:23am UTC](https://discuss.elastic.co/t/discovery-seed-hosts-and-cluster-initial-master-nodes/330945 "2023-04-27T11:23:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikewillis](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mikewillis](https://discuss.elastic.co/u/mikewillis)\
**Post date:** [April 27, 2023, 11:23am UTC](https://discuss.elastic.co/t/discovery-seed-hosts-and-cluster-initial-master-nodes/330945/1 "2023-04-27T11:23:27Z")

</div>

I'm struggling to understand the discovery settings now that  
`discovery.zen.minimum_master_nodes` has gone away.

> **[Discovery and cluster formation settings | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-settings.html)**

(where current is 8.7) says that `discovery.seed_hosts`

> Provides a list of the addresses of the master-eligible nodes in the  
> cluster.

But then there's also `cluster.initial_master_nodes`

> Sets the initial set of master-eligible nodes in a brand-new cluster.

So one has to specify the list of master eligible nodes twice. Which  
seems odd.

> **[Discovery and cluster formation settings | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-settings.html)**

says of `cluster.initial_master_nodes`

> Remove this setting once the cluster has formed.

> **[Important Elasticsearch configuration | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#initial_master_nodes)**

provides a much stronger warning with the words about removing the  
setting presented next to an image of a warning sign and the word  
IMPORTANT. Nothing is said about why it's IMPORTANT. I've found a post  
on this forum which says there is potential for data loss, in "rare  
circumstances".

It used to be that configuration for nodes in a new cluster could be deployed then simply left alone. Now people are expected to deploy one set of configuration and remember that once the cluster is up and running, they should deploy different configuration. This seems clunky, unintuitive, and setting people up to fail. It is inevitable that some will forget to remove the setting.

Please could someone explain:

Why do `discovery.seed_hosts` and `cluster.initial_master_nodes` both exist?

What problems may result from a failure to remove `cluster.initial_master_nodes` ?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 27, 2023, 4:14pm UTC](https://discuss.elastic.co/t/discovery-seed-hosts-and-cluster-initial-master-nodes/330945/2 "2023-04-27T16:14:42Z")

</div>

> [@mikewillis](#):
>
> Why do `discovery.seed_hosts` and `cluster.initial_master_nodes` both exist?

The former pertains to discovery: it allows you to specify the addresses of the master nodes. This is needed whenever a node starts up, or a new master is elected. The latter pertains to cluster bootstrapping and requires the _identities_ (i.e. the names) of the master nodes. It only happens once in the lifetime of a cluster. They're very different things. The older `minimum_master_nodes` mechanism was removed a very long time ago since it was fundamentally unsafe and led to data loss.

> [@mikewillis](#):
>
> What problems may result from a failure to remove `cluster.initial_master_nodes` ?

This is covered by the docs linked from the ones you linked:

> **[Bootstrapping a cluster | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html)**

> If you leave `cluster.initial_master_nodes` in place once the cluster has formed then there is a risk that a future misconfiguration may result in bootstrapping a new cluster alongside your existing cluster. It may not be possible to recover from this situation without losing data.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 27, 2023, 4:43pm UTC](https://discuss.elastic.co/t/discovery-seed-hosts-and-cluster-initial-master-nodes/330945/3 "2023-04-27T16:43:40Z")

</div>

> [@DavidTurner](#):
>
> The older `minimum_master_nodes` mechanism was removed a very long time ago since it was fundamentally unsafe and led to data loss.

... moreover, those ancient versions also required you to set `discovery.zen.ping.unicast.hosts`, which did exactly what `discovery.seed_hosts` does today. It's just a shorter name for the same setting.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 25, 2023, 4:44pm UTC](https://discuss.elastic.co/t/discovery-seed-hosts-and-cluster-initial-master-nodes/330945/4 "2023-05-25T16:44:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
