Skip to content

More helpful logs if a single-node cluster has nontrivial discovery config #85222

Closed
@DaveCTurner

Description

@DaveCTurner

Users sometimes accidentally auto-bootstrap their nodes into single-node clusters and then try and join them all together later by setting discovery.seed_hosts or similar. Elasticsearch doesn't care if discovery points to a few extra nodes so today it reports no problems, but it's frustrating to the user that it doesn't do what they expect it to do and also doesn't indicate why.

It's almost certainly incorrect to have a nontrivial discovery config in a single-node cluster: discovery.seed_hosts and discovery.seed_providers should both be unset or empty1, so this is a strong indicator that the user is trying to form a multi-node cluster incorrectly. We can therefore be more helpful to these users by emitting periodic warnings in a single-node cluster with nontrivial discovery config:

This node is a fully-formed single-node cluster with cluster UUID [{clusterUUID}], but [{setting}] is set to [{value}] as if to discover other nodes and form a multi-node cluster. Fully-formed clusters do not attempt to discover other nodes, and nodes with different cluster UUIDs cannot belong to the same cluster. The cluster UUID persists across restarts and can only be changed by deleting the contents of the node's data path(s). Remove the discovery configuration to suppress this message.

Footnotes

  1. it's also (kind of) acceptable if discovery.seed_hosts contains just the node's own publish address, or we're using just the file provider and unicast_hosts.txt contains just the node's own publish address.

Metadata

Metadata

Assignees

Labels

:Distributed Coordination/Cluster CoordinationCluster formation and cluster state publication, including cluster membership and fault detection.SupportabilityImprove our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better.Team:Distributed (Obsolete)Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions