Skip to content

Improve single-node cluster warning for discovery seed hosts only if discovery.seed_hosts is not set #88075

@kingherc

Description

@kingherc

Description

PR #88013 introduces a periodic check that logs a warning that a fully-formed single-node cluster has discovery seed hosts set. For the moment, we ignore this warning in cases where the configured seed hosts are default addresses. However, we would like to improve that and ignore the warning only if discovery.seed_hosts is not set. Something like this:

// New:
// Case that the address of the machine is put in seed hosts. Should be ignored.
if (lastResolvedAddresses.size() == 1 && lastResolvedAddresses.get(0) == this.getLocalNode().getAddress()) {
        return;
}

if (DISCOVERY_SEED_HOSTS_SETTING.exists(settings) == false) { // new `if`
        Set<String> defaultAddresses = Set.copyOf(transportService.getDefaultSeedAddresses());
        if (lastResolvedAddresses.stream().allMatch(t -> defaultAddresses.contains(t.toString()))) {
            return;
        }
}

In order to do the above, however, we must first ensure that no user is putting a single-node address (e.g., 127.0.0.1) in the unicast_hosts.txt file, apart from maybe the node's address.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Distributed Coordination/Cluster CoordinationCluster formation and cluster state publication, including cluster membership and fault detection.>enhancementSupportabilityImprove 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.needs:triageRequires assignment of a team area label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions