From 2e243c4dfa418e0757a3df75d8bba7ca2fd54420 Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Fri, 24 Jun 2022 16:27:37 +0300 Subject: [PATCH 01/16] Periodic warning for 1-node cluster w/ seed hosts For fully-formed single-node clusters, emit a periodic warning if seed hosts have been configured. Closes #85222 --- docs/changelog/88013.yaml | 6 ++ .../discovery/discovery-settings.asciidoc | 6 ++ .../cluster/coordination/Coordinator.java | 66 +++++++++++++++++++ .../coordination/CoordinatorTests.java | 54 +++++++++++++++ .../AbstractCoordinatorTestCase.java | 4 ++ 5 files changed, 136 insertions(+) create mode 100644 docs/changelog/88013.yaml diff --git a/docs/changelog/88013.yaml b/docs/changelog/88013.yaml new file mode 100644 index 0000000000000..3a4533728db70 --- /dev/null +++ b/docs/changelog/88013.yaml @@ -0,0 +1,6 @@ +pr: 88013 +summary: Periodic warning for 1-node cluster w/ seed hosts +area: Cluster Coordination +type: enhancement +issues: + - 85222 diff --git a/docs/reference/modules/discovery/discovery-settings.asciidoc b/docs/reference/modules/discovery/discovery-settings.asciidoc index e875fe61ee42d..64598fa0aa843 100644 --- a/docs/reference/modules/discovery/discovery-settings.asciidoc +++ b/docs/reference/modules/discovery/discovery-settings.asciidoc @@ -201,6 +201,12 @@ Sets how long the master node waits for each cluster state update to be completely published to all nodes, unless `discovery.type` is set to `single-node`. The default value is `30s`. See <>. +`cluster.single_node_cluster_seed_hosts_check_interval`:: +(<>) +Sets the interval of the check that warns that seed hosts (see +`discovery.seed_providers` and `discovery.seed_hosts`) have been defined for a +fully-formed single-node cluster. The default value is `30s`. + `cluster.join_validation.cache_timeout`:: (<>) When a node requests to join the cluster, the elected master node sends it a diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index 1ab8227a14eb9..3a51727646269 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -92,6 +92,7 @@ import static org.elasticsearch.cluster.coordination.NoMasterBlockService.NO_MASTER_BLOCK_ID; import static org.elasticsearch.core.Strings.format; +import static org.elasticsearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING; import static org.elasticsearch.gateway.ClusterStateUpdaters.hideStateIfNotRecovered; import static org.elasticsearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; import static org.elasticsearch.monitor.StatusInfo.Status.UNHEALTHY; @@ -116,6 +117,13 @@ public class Coordinator extends AbstractLifecycleComponent implements ClusterSt Setting.Property.NodeScope ); + public static final Setting SINGLE_NODE_CLUSTER_SEED_HOSTS_CHECK_INTERVAL_SETTING = Setting.timeSetting( + "cluster.single_node_cluster_seed_hosts_check_interval", + TimeValue.timeValueMillis(30000), + TimeValue.timeValueMillis(1), + Setting.Property.NodeScope + ); + public static final String COMMIT_STATE_ACTION_NAME = "internal:cluster/coordination/commit_state"; private final Settings settings; @@ -140,6 +148,9 @@ public class Coordinator extends AbstractLifecycleComponent implements ClusterSt private final SeedHostsResolver configuredHostsResolver; private final TimeValue publishTimeout; private final TimeValue publishInfoTimeout; + private final TimeValue singleNodeClusterSeedHostsCheckInterval; + @Nullable + private Scheduler.Cancellable singleNodeClusterChecker = null; private final PublicationTransportHandler publicationHandler; private final LeaderChecker leaderChecker; private final FollowersChecker followersChecker; @@ -218,6 +229,7 @@ public Coordinator( this.joinAccumulator = new InitialJoinAccumulator(); this.publishTimeout = PUBLISH_TIMEOUT_SETTING.get(settings); this.publishInfoTimeout = PUBLISH_INFO_TIMEOUT_SETTING.get(settings); + this.singleNodeClusterSeedHostsCheckInterval = SINGLE_NODE_CLUSTER_SEED_HOSTS_CHECK_INTERVAL_SETTING.get(settings); this.random = random; this.electionSchedulerFactory = new ElectionSchedulerFactory(settings, random, transportService.getThreadPool()); this.preVoteCollector = new PreVoteCollector( @@ -739,6 +751,13 @@ private void processJoinRequest(JoinRequest joinRequest, ActionListener jo } } + private void cancelSingleNodeClusterChecker() { + if (singleNodeClusterChecker != null) { + singleNodeClusterChecker.cancel(); + singleNodeClusterChecker = null; + } + } + void becomeCandidate(String method) { assert Thread.holdsLock(mutex) : "Coordinator mutex not held"; logger.debug( @@ -748,6 +767,7 @@ void becomeCandidate(String method) { mode, lastKnownLeader ); + cancelSingleNodeClusterChecker(); if (mode != Mode.CANDIDATE) { final Mode prevMode = mode; @@ -803,6 +823,46 @@ private void becomeLeader() { assert leaderChecker.leader() == null : leaderChecker.leader(); followersChecker.updateFastResponseState(getCurrentTerm(), mode); + + if (applierState.nodes().size() > 1) { + cancelSingleNodeClusterChecker(); + } else if (singleNodeClusterChecker == null) { + singleNodeClusterChecker = transportService.getThreadPool().scheduleWithFixedDelay(() -> { + if (applierState.nodes().size() > 1) { + return; + } + + List lastResolvedAddresses = peerFinder.getLastResolvedAddresses(); + if (lastResolvedAddresses.isEmpty()) { + return; + } + + if (lastResolvedAddresses.size() == 1 && lastResolvedAddresses.get(0) == this.getLocalNode().getAddress()) { + return; + } + + // Ignore default case where the seed hosts are the default seed addresses from settings. + if (DISCOVERY_SEED_HOSTS_SETTING.exists(settings) == false) { + List lastResolvedAddressesAsStrings = lastResolvedAddresses.stream() + .map(Object::toString) + .collect(Collectors.toUnmodifiableList()); + List defaultAddresses = transportService.getDefaultSeedAddresses(); + if (defaultAddresses.containsAll(lastResolvedAddressesAsStrings)) { + return; + } + } + + logger.warn( + "This node is a fully-formed single-node cluster with cluster UUID [{}], but seed hosts " + + "(discovery.seed_hosts and/or discovery.seed_providers settings) have been provided 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 seed hosts to suppress this message.", + applierState.metadata().clusterUUID() + ); + }, this.singleNodeClusterSeedHostsCheckInterval, Names.SAME); + } } void becomeFollower(String method, DiscoveryNode leaderNode) { @@ -822,6 +882,7 @@ void becomeFollower(String method, DiscoveryNode leaderNode) { lastKnownLeader ); } + cancelSingleNodeClusterChecker(); final boolean restartLeaderChecker = (mode == Mode.FOLLOWER && Optional.of(leaderNode).equals(lastKnownLeader)) == false; @@ -1028,6 +1089,10 @@ assert getLocalNode().equals(applierState.nodes().getMasterNode()) : coordinationState.get().getLastAcceptedConfiguration() + " != " + coordinationState.get().getLastCommittedConfiguration(); + + if (coordinationState.get().getLastAcceptedState().nodes().size() == 1) { + assert singleNodeClusterChecker != null; + } } else if (mode == Mode.FOLLOWER) { assert coordinationState.get().electionWon() == false : getLocalNode() + " is FOLLOWER so electionWon() should be false"; assert lastKnownLeader.isPresent() && (lastKnownLeader.get().equals(getLocalNode()) == false); @@ -1045,6 +1110,7 @@ assert getLocalNode().equals(applierState.nodes().getMasterNode()) assert currentPublication.map(Publication::isCommitted).orElse(true); assert preVoteCollector.getLeader().equals(lastKnownLeader.get()) : preVoteCollector; assert clusterFormationFailureHelper.isRunning() == false; + assert singleNodeClusterChecker == null; } else { assert mode == Mode.CANDIDATE; assert joinAccumulator instanceof JoinHelper.CandidateJoinAccumulator; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java index c481fabd83de8..43c7d25a0245c 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java @@ -2109,6 +2109,60 @@ public void assertMatched() { } } + @TestLogging( + reason = "testing warning of a single-node cluster having discovery seed hosts", + value = "org.elasticsearch.cluster.coordination.Coordinator:WARN" + ) + public void testLogsWarningPeriodicallyIfSingleNodeClusterHasSeedHosts() throws IllegalAccessException { + final long warningDelayMillis; + final Settings settings; + if (randomBoolean()) { + settings = Settings.EMPTY; + warningDelayMillis = Coordinator.SINGLE_NODE_CLUSTER_SEED_HOSTS_CHECK_INTERVAL_SETTING.get(settings).millis(); + } else { + warningDelayMillis = randomLongBetween(1, 100000); + settings = Settings.builder() + .put(ClusterFormationFailureHelper.DISCOVERY_CLUSTER_FORMATION_WARNING_TIMEOUT_SETTING.getKey(), warningDelayMillis + "ms") + .build(); + } + logger.info("--> emitting warnings every [{}ms]", warningDelayMillis); + + try (Cluster cluster = new Cluster(1, true, settings)) { + cluster.setSeedHostsList(List.of(buildNewFakeTransportAddress())); + cluster.runRandomly(); + cluster.stabilise(); + + for (int i = scaledRandomIntBetween(1, 10); i >= 0; i--) { + final MockLogAppender mockLogAppender = new MockLogAppender(); + try { + mockLogAppender.start(); + Loggers.addAppender(LogManager.getLogger(Coordinator.class), mockLogAppender); + mockLogAppender.addExpectation(new MockLogAppender.LoggingExpectation() { + String loggedClusterUuid; + + @Override + public void match(LogEvent event) { + final String message = event.getMessage().getFormattedMessage(); + assertThat(message, startsWith("This node is a fully-formed single-node cluster with cluster UUID")); + loggedClusterUuid = (String) event.getMessage().getParameters()[0]; + } + + @Override + public void assertMatched() { + final String clusterUuid = cluster.getAnyNode().getLastAppliedClusterState().metadata().clusterUUID(); + assertThat(loggedClusterUuid + " vs " + clusterUuid, clusterUuid, equalTo(clusterUuid)); + } + }); + cluster.runFor(warningDelayMillis + DEFAULT_DELAY_VARIABILITY, "waiting for warning to be emitted"); + mockLogAppender.assertAllExpectationsMatched(); + } finally { + Loggers.removeAppender(LogManager.getLogger(Coordinator.class), mockLogAppender); + mockLogAppender.stop(); + } + } + } + } + @TestLogging( reason = "testing LagDetector and CoordinatorPublication logging", value = "org.elasticsearch.cluster.coordination.LagDetector:DEBUG," diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java b/test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java index 2a23cc009b5dd..f793b9a9fdedc 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java @@ -854,6 +854,10 @@ void setEmptySeedHostsList() { seedHostsList = emptyList(); } + void setSeedHostsList(List addressesList) { + seedHostsList = addressesList; + } + void blackholeConnectionsFrom(ClusterNode sender, ClusterNode destination) { blackholedConnections.add(Tuple.tuple(sender.getId(), destination.getId())); } From 9a0eef82d7c10491fe5f87bc9822b6a2a6b21d51 Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 12:19:37 +0300 Subject: [PATCH 02/16] Update server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java Co-authored-by: David Turner --- .../java/org/elasticsearch/cluster/coordination/Coordinator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index 3a51727646269..2e2698feae9d2 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -752,6 +752,7 @@ private void processJoinRequest(JoinRequest joinRequest, ActionListener jo } private void cancelSingleNodeClusterChecker() { + assert Thread.holdsLock(mutex) : "Coordinator mutex not held"; if (singleNodeClusterChecker != null) { singleNodeClusterChecker.cancel(); singleNodeClusterChecker = null; From 23ceffb1df1473deb5c279a2ac0df95ed6607913 Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 12:30:32 +0300 Subject: [PATCH 03/16] Adopt comments from PR --- .../cluster/coordination/Coordinator.java | 70 +++++++++---------- .../common/settings/ClusterSettings.java | 1 + 2 files changed, 36 insertions(+), 35 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index 2e2698feae9d2..d208c60f7df13 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -92,6 +92,7 @@ import static org.elasticsearch.cluster.coordination.NoMasterBlockService.NO_MASTER_BLOCK_ID; import static org.elasticsearch.core.Strings.format; +import static org.elasticsearch.discovery.DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING; import static org.elasticsearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING; import static org.elasticsearch.gateway.ClusterStateUpdaters.hideStateIfNotRecovered; import static org.elasticsearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; @@ -759,6 +760,38 @@ private void cancelSingleNodeClusterChecker() { } } + private void checkSingleNodeCluster() { + if (applierState.nodes().size() > 1) { + return; + } + + List lastResolvedAddresses = peerFinder.getLastResolvedAddresses(); + if (lastResolvedAddresses.isEmpty()) { + return; + } + + // Ignore default case where the seed hosts are the default seed addresses from settings. + if (DISCOVERY_SEED_HOSTS_SETTING.exists(settings) == false) { + Set defaultAddresses = Set.copyOf(transportService.getDefaultSeedAddresses()); + if (lastResolvedAddresses.stream().allMatch(t -> defaultAddresses.contains(t.toString()))) { + return; + } + } + + logger.warn( + """ + This node is a fully-formed single-node cluster with cluster UUID [{}], but it is configured as if to discover \ + other nodes and form a multi-node cluster via [{}]. 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.""", + applierState.metadata().clusterUUID(), + DISCOVERY_SEED_PROVIDERS_SETTING.exists(settings) + ? DISCOVERY_SEED_PROVIDERS_SETTING.getKey() + "=" + DISCOVERY_SEED_PROVIDERS_SETTING.get(settings) + : DISCOVERY_SEED_HOSTS_SETTING.getKey() + "=" + DISCOVERY_SEED_HOSTS_SETTING.get(settings) + ); + } + void becomeCandidate(String method) { assert Thread.holdsLock(mutex) : "Coordinator mutex not held"; logger.debug( @@ -828,41 +861,8 @@ private void becomeLeader() { if (applierState.nodes().size() > 1) { cancelSingleNodeClusterChecker(); } else if (singleNodeClusterChecker == null) { - singleNodeClusterChecker = transportService.getThreadPool().scheduleWithFixedDelay(() -> { - if (applierState.nodes().size() > 1) { - return; - } - - List lastResolvedAddresses = peerFinder.getLastResolvedAddresses(); - if (lastResolvedAddresses.isEmpty()) { - return; - } - - if (lastResolvedAddresses.size() == 1 && lastResolvedAddresses.get(0) == this.getLocalNode().getAddress()) { - return; - } - - // Ignore default case where the seed hosts are the default seed addresses from settings. - if (DISCOVERY_SEED_HOSTS_SETTING.exists(settings) == false) { - List lastResolvedAddressesAsStrings = lastResolvedAddresses.stream() - .map(Object::toString) - .collect(Collectors.toUnmodifiableList()); - List defaultAddresses = transportService.getDefaultSeedAddresses(); - if (defaultAddresses.containsAll(lastResolvedAddressesAsStrings)) { - return; - } - } - - logger.warn( - "This node is a fully-formed single-node cluster with cluster UUID [{}], but seed hosts " - + "(discovery.seed_hosts and/or discovery.seed_providers settings) have been provided 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 seed hosts to suppress this message.", - applierState.metadata().clusterUUID() - ); - }, this.singleNodeClusterSeedHostsCheckInterval, Names.SAME); + singleNodeClusterChecker = transportService.getThreadPool() + .scheduleWithFixedDelay(() -> { checkSingleNodeCluster(); }, this.singleNodeClusterSeedHostsCheckInterval, Names.SAME); } } diff --git a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java index b225f6fb4ca87..89d16c01df42e 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java +++ b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java @@ -492,6 +492,7 @@ public void apply(Settings value, Settings current, Settings previous) { ElectionSchedulerFactory.ELECTION_DURATION_SETTING, Coordinator.PUBLISH_TIMEOUT_SETTING, Coordinator.PUBLISH_INFO_TIMEOUT_SETTING, + Coordinator.SINGLE_NODE_CLUSTER_SEED_HOSTS_CHECK_INTERVAL_SETTING, JoinValidationService.JOIN_VALIDATION_CACHE_TIMEOUT_SETTING, FollowersChecker.FOLLOWER_CHECK_TIMEOUT_SETTING, FollowersChecker.FOLLOWER_CHECK_INTERVAL_SETTING, From 88d680a4f4cf499ff93f46dc1da85238f1d782ba Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 13:51:37 +0300 Subject: [PATCH 04/16] Add debug log message for resolved addresses --- .../org/elasticsearch/cluster/coordination/Coordinator.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index d208c60f7df13..92668fa734729 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -790,6 +790,12 @@ private void checkSingleNodeCluster() { ? DISCOVERY_SEED_PROVIDERS_SETTING.getKey() + "=" + DISCOVERY_SEED_PROVIDERS_SETTING.get(settings) : DISCOVERY_SEED_HOSTS_SETTING.getKey() + "=" + DISCOVERY_SEED_HOSTS_SETTING.get(settings) ); + + logger.debug( + "The address of this local node is: [{}]. The addresses of the last resolved discovery seed hosts are: [{}].", + this.getLocalNode().getAddress(), + lastResolvedAddresses + ); } void becomeCandidate(String method) { From f551904086c3cf26b1d36123c4180690d807c7ae Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 14:34:28 +0300 Subject: [PATCH 05/16] Ignore default addresses. --- .../cluster/coordination/Coordinator.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index 92668fa734729..0141f74ad63bb 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -770,12 +770,11 @@ private void checkSingleNodeCluster() { return; } - // Ignore default case where the seed hosts are the default seed addresses from settings. - if (DISCOVERY_SEED_HOSTS_SETTING.exists(settings) == false) { - Set defaultAddresses = Set.copyOf(transportService.getDefaultSeedAddresses()); - if (lastResolvedAddresses.stream().allMatch(t -> defaultAddresses.contains(t.toString()))) { - return; - } + // Ignore case where the seed hosts are from the default seed addresses + Set defaultAddresses = Set.copyOf(transportService.getDefaultSeedAddresses()); + logger.debug("The default addresses are: {}.", defaultAddresses); // TODO: temporary. Remove before merging. + if (lastResolvedAddresses.stream().allMatch(t -> defaultAddresses.contains(t.toString()))) { + return; } logger.warn( @@ -792,7 +791,7 @@ private void checkSingleNodeCluster() { ); logger.debug( - "The address of this local node is: [{}]. The addresses of the last resolved discovery seed hosts are: [{}].", + "The address of this local node is: [{}]. The addresses of the last resolved discovery seed hosts are: {}.", this.getLocalNode().getAddress(), lastResolvedAddresses ); From 01de203cd34d55393be8787ea201e9486179bf0f Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 14:53:45 +0300 Subject: [PATCH 06/16] Remove temporary debug message --- .../java/org/elasticsearch/cluster/coordination/Coordinator.java | 1 - 1 file changed, 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index 0141f74ad63bb..332186b553882 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -772,7 +772,6 @@ private void checkSingleNodeCluster() { // Ignore case where the seed hosts are from the default seed addresses Set defaultAddresses = Set.copyOf(transportService.getDefaultSeedAddresses()); - logger.debug("The default addresses are: {}.", defaultAddresses); // TODO: temporary. Remove before merging. if (lastResolvedAddresses.stream().allMatch(t -> defaultAddresses.contains(t.toString()))) { return; } From ab0f35736779575edcf4d23609c1a2f9c55d055f Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 15:54:38 +0300 Subject: [PATCH 07/16] Temporary logging --- .../cluster/coordination/Coordinator.java | 10 ++++++++++ .../discovery/FileBasedSeedHostsProvider.java | 2 +- .../discovery/SettingsBasedSeedHostsProvider.java | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index 332186b553882..d77c77a66cb8b 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -772,6 +772,16 @@ private void checkSingleNodeCluster() { // Ignore case where the seed hosts are from the default seed addresses Set defaultAddresses = Set.copyOf(transportService.getDefaultSeedAddresses()); + + // TODO: temporary. Remove section before merging. + logger.info("The default addresses are: {}.", defaultAddresses); + logger.info("Discovery seed hosts setting exists: {}.", DISCOVERY_SEED_HOSTS_SETTING.exists(settings)); + logger.info( + "The address of this local node is: [{}]. The addresses of the last resolved discovery seed hosts are: {}.", + this.getLocalNode().getAddress(), + lastResolvedAddresses + ); + if (lastResolvedAddresses.stream().allMatch(t -> defaultAddresses.contains(t.toString()))) { return; } diff --git a/server/src/main/java/org/elasticsearch/discovery/FileBasedSeedHostsProvider.java b/server/src/main/java/org/elasticsearch/discovery/FileBasedSeedHostsProvider.java index 0c80a53bfd8f4..b3a9f99702e16 100644 --- a/server/src/main/java/org/elasticsearch/discovery/FileBasedSeedHostsProvider.java +++ b/server/src/main/java/org/elasticsearch/discovery/FileBasedSeedHostsProvider.java @@ -63,7 +63,7 @@ private List getHostsList() { @Override public List getSeedAddresses(HostsResolver hostsResolver) { final List transportAddresses = hostsResolver.resolveHosts(getHostsList()); - logger.debug("seed addresses: {}", transportAddresses); + logger.info("seed addresses: {}", transportAddresses); return transportAddresses; } } diff --git a/server/src/main/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProvider.java b/server/src/main/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProvider.java index eb0553263b19b..266dbb847017a 100644 --- a/server/src/main/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProvider.java +++ b/server/src/main/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProvider.java @@ -50,7 +50,7 @@ public SettingsBasedSeedHostsProvider(Settings settings, TransportService transp configuredHosts = transportService.getDefaultSeedAddresses(); } - logger.debug("using initial hosts {}", configuredHosts); + logger.info("using initial hosts {}", configuredHosts); } @Override From 8cde445d696ce1ff62a4906ffc357f1a03fa8f95 Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 16:34:17 +0300 Subject: [PATCH 08/16] Revert "Temporary logging" This reverts commit ab0f35736779575edcf4d23609c1a2f9c55d055f. --- .../cluster/coordination/Coordinator.java | 10 ---------- .../discovery/FileBasedSeedHostsProvider.java | 2 +- .../discovery/SettingsBasedSeedHostsProvider.java | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index d77c77a66cb8b..332186b553882 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -772,16 +772,6 @@ private void checkSingleNodeCluster() { // Ignore case where the seed hosts are from the default seed addresses Set defaultAddresses = Set.copyOf(transportService.getDefaultSeedAddresses()); - - // TODO: temporary. Remove section before merging. - logger.info("The default addresses are: {}.", defaultAddresses); - logger.info("Discovery seed hosts setting exists: {}.", DISCOVERY_SEED_HOSTS_SETTING.exists(settings)); - logger.info( - "The address of this local node is: [{}]. The addresses of the last resolved discovery seed hosts are: {}.", - this.getLocalNode().getAddress(), - lastResolvedAddresses - ); - if (lastResolvedAddresses.stream().allMatch(t -> defaultAddresses.contains(t.toString()))) { return; } diff --git a/server/src/main/java/org/elasticsearch/discovery/FileBasedSeedHostsProvider.java b/server/src/main/java/org/elasticsearch/discovery/FileBasedSeedHostsProvider.java index b3a9f99702e16..0c80a53bfd8f4 100644 --- a/server/src/main/java/org/elasticsearch/discovery/FileBasedSeedHostsProvider.java +++ b/server/src/main/java/org/elasticsearch/discovery/FileBasedSeedHostsProvider.java @@ -63,7 +63,7 @@ private List getHostsList() { @Override public List getSeedAddresses(HostsResolver hostsResolver) { final List transportAddresses = hostsResolver.resolveHosts(getHostsList()); - logger.info("seed addresses: {}", transportAddresses); + logger.debug("seed addresses: {}", transportAddresses); return transportAddresses; } } diff --git a/server/src/main/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProvider.java b/server/src/main/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProvider.java index 266dbb847017a..eb0553263b19b 100644 --- a/server/src/main/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProvider.java +++ b/server/src/main/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProvider.java @@ -50,7 +50,7 @@ public SettingsBasedSeedHostsProvider(Settings settings, TransportService transp configuredHosts = transportService.getDefaultSeedAddresses(); } - logger.info("using initial hosts {}", configuredHosts); + logger.debug("using initial hosts {}", configuredHosts); } @Override From 132c886a24e640be5c7fb41d4d820ddd162836e1 Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 16:48:22 +0300 Subject: [PATCH 09/16] Mention new issue for improvement about warning --- .../org/elasticsearch/cluster/coordination/Coordinator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index 332186b553882..b89f95b9eabdc 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -771,6 +771,8 @@ private void checkSingleNodeCluster() { } // Ignore case where the seed hosts are from the default seed addresses + // TODO: It may be better to consider this `if` only if DISCOVERY_SEED_HOSTS_SETTING is not set. In order to do that, we should + // ensure that there are no users inputting a single-node address in the unicast_hosts.txt file. #88075 Set defaultAddresses = Set.copyOf(transportService.getDefaultSeedAddresses()); if (lastResolvedAddresses.stream().allMatch(t -> defaultAddresses.contains(t.toString()))) { return; From 08f4c99c1344c20597229a1bde4c293777a24e60 Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 17:08:07 +0300 Subject: [PATCH 10/16] Fix comment --- .../org/elasticsearch/cluster/coordination/Coordinator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index b89f95b9eabdc..eef4fd470382e 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -772,7 +772,7 @@ private void checkSingleNodeCluster() { // Ignore case where the seed hosts are from the default seed addresses // TODO: It may be better to consider this `if` only if DISCOVERY_SEED_HOSTS_SETTING is not set. In order to do that, we should - // ensure that there are no users inputting a single-node address in the unicast_hosts.txt file. #88075 + // ensure that there are no users inputting a single-node address in the unicast_hosts.txt file. #88075 Set defaultAddresses = Set.copyOf(transportService.getDefaultSeedAddresses()); if (lastResolvedAddresses.stream().allMatch(t -> defaultAddresses.contains(t.toString()))) { return; From 668de246df7617b395ac19d96e2a01422a4f5494 Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 19:06:17 +0300 Subject: [PATCH 11/16] Finally emit the warning only if seed_hosts is set --- .../discovery/discovery-settings.asciidoc | 4 +- .../cluster/coordination/Coordinator.java | 47 +++++++------------ .../coordination/CoordinatorTests.java | 9 +++- .../AbstractCoordinatorTestCase.java | 4 -- 4 files changed, 25 insertions(+), 39 deletions(-) diff --git a/docs/reference/modules/discovery/discovery-settings.asciidoc b/docs/reference/modules/discovery/discovery-settings.asciidoc index 64598fa0aa843..57785fb959217 100644 --- a/docs/reference/modules/discovery/discovery-settings.asciidoc +++ b/docs/reference/modules/discovery/discovery-settings.asciidoc @@ -204,8 +204,8 @@ completely published to all nodes, unless `discovery.type` is set to `cluster.single_node_cluster_seed_hosts_check_interval`:: (<>) Sets the interval of the check that warns that seed hosts (see -`discovery.seed_providers` and `discovery.seed_hosts`) have been defined for a -fully-formed single-node cluster. The default value is `30s`. +`discovery.seed_hosts`) have been defined for a fully-formed single-node +cluster. The default value is `30s`. `cluster.join_validation.cache_timeout`:: (<>) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index eef4fd470382e..67c75f91fa139 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -92,7 +92,6 @@ import static org.elasticsearch.cluster.coordination.NoMasterBlockService.NO_MASTER_BLOCK_ID; import static org.elasticsearch.core.Strings.format; -import static org.elasticsearch.discovery.DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING; import static org.elasticsearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING; import static org.elasticsearch.gateway.ClusterStateUpdaters.hideStateIfNotRecovered; import static org.elasticsearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; @@ -765,37 +764,23 @@ private void checkSingleNodeCluster() { return; } - List lastResolvedAddresses = peerFinder.getLastResolvedAddresses(); - if (lastResolvedAddresses.isEmpty()) { - return; - } - - // Ignore case where the seed hosts are from the default seed addresses - // TODO: It may be better to consider this `if` only if DISCOVERY_SEED_HOSTS_SETTING is not set. In order to do that, we should - // ensure that there are no users inputting a single-node address in the unicast_hosts.txt file. #88075 - Set defaultAddresses = Set.copyOf(transportService.getDefaultSeedAddresses()); - if (lastResolvedAddresses.stream().allMatch(t -> defaultAddresses.contains(t.toString()))) { - return; + if (DISCOVERY_SEED_HOSTS_SETTING.exists(settings)) { + if (DISCOVERY_SEED_HOSTS_SETTING.get(settings).isEmpty()) { + // For a single-node cluster, the only acceptable setting is an empty list. + return; + } else { + logger.warn( + """ + This node is a fully-formed single-node cluster with cluster UUID [{}], but it is configured as if to discover \ + other nodes and form a multi-node cluster via the [{}] setting. 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.""", + applierState.metadata().clusterUUID(), + DISCOVERY_SEED_HOSTS_SETTING.getKey() + "=" + DISCOVERY_SEED_HOSTS_SETTING.get(settings) + ); + } } - - logger.warn( - """ - This node is a fully-formed single-node cluster with cluster UUID [{}], but it is configured as if to discover \ - other nodes and form a multi-node cluster via [{}]. 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.""", - applierState.metadata().clusterUUID(), - DISCOVERY_SEED_PROVIDERS_SETTING.exists(settings) - ? DISCOVERY_SEED_PROVIDERS_SETTING.getKey() + "=" + DISCOVERY_SEED_PROVIDERS_SETTING.get(settings) - : DISCOVERY_SEED_HOSTS_SETTING.getKey() + "=" + DISCOVERY_SEED_HOSTS_SETTING.get(settings) - ); - - logger.debug( - "The address of this local node is: [{}]. The addresses of the last resolved discovery seed hosts are: {}.", - this.getLocalNode().getAddress(), - lastResolvedAddresses - ); } void becomeCandidate(String method) { diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java index 43c7d25a0245c..ed512dd934a18 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java @@ -34,6 +34,7 @@ import org.elasticsearch.common.regex.Regex; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings.Builder; +import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.common.util.concurrent.DeterministicTaskQueue; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.core.Nullable; @@ -77,6 +78,7 @@ import static org.elasticsearch.cluster.coordination.NoMasterBlockService.NO_MASTER_BLOCK_WRITES; import static org.elasticsearch.cluster.coordination.Reconfigurator.CLUSTER_AUTO_SHRINK_VOTING_CONFIGURATION; import static org.elasticsearch.discovery.PeerFinder.DISCOVERY_FIND_PEERS_INTERVAL_SETTING; +import static org.elasticsearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING; import static org.elasticsearch.monitor.StatusInfo.Status.HEALTHY; import static org.elasticsearch.monitor.StatusInfo.Status.UNHEALTHY; import static org.elasticsearch.test.NodeRoles.nonMasterNode; @@ -2116,19 +2118,22 @@ public void assertMatched() { public void testLogsWarningPeriodicallyIfSingleNodeClusterHasSeedHosts() throws IllegalAccessException { final long warningDelayMillis; final Settings settings; + final String fakeSeedHost = buildNewFakeTransportAddress().toString(); if (randomBoolean()) { - settings = Settings.EMPTY; + settings = Settings.builder() + .putList(DISCOVERY_SEED_HOSTS_SETTING.getKey(), fakeSeedHost) + .build(); warningDelayMillis = Coordinator.SINGLE_NODE_CLUSTER_SEED_HOSTS_CHECK_INTERVAL_SETTING.get(settings).millis(); } else { warningDelayMillis = randomLongBetween(1, 100000); settings = Settings.builder() .put(ClusterFormationFailureHelper.DISCOVERY_CLUSTER_FORMATION_WARNING_TIMEOUT_SETTING.getKey(), warningDelayMillis + "ms") + .putList(DISCOVERY_SEED_HOSTS_SETTING.getKey(), fakeSeedHost) .build(); } logger.info("--> emitting warnings every [{}ms]", warningDelayMillis); try (Cluster cluster = new Cluster(1, true, settings)) { - cluster.setSeedHostsList(List.of(buildNewFakeTransportAddress())); cluster.runRandomly(); cluster.stabilise(); diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java b/test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java index f793b9a9fdedc..2a23cc009b5dd 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java @@ -854,10 +854,6 @@ void setEmptySeedHostsList() { seedHostsList = emptyList(); } - void setSeedHostsList(List addressesList) { - seedHostsList = addressesList; - } - void blackholeConnectionsFrom(ClusterNode sender, ClusterNode destination) { blackholedConnections.add(Tuple.tuple(sender.getId(), destination.getId())); } From 59b57cd8c1ab013415d93c626e4c21219e61b89c Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 19:11:01 +0300 Subject: [PATCH 12/16] Remove unused import --- .../org/elasticsearch/cluster/coordination/CoordinatorTests.java | 1 - 1 file changed, 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java index ed512dd934a18..2fc5245ebcfe1 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java @@ -34,7 +34,6 @@ import org.elasticsearch.common.regex.Regex; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings.Builder; -import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.common.util.concurrent.DeterministicTaskQueue; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.core.Nullable; From 9213255d123393eb62338bbd509b848f37cc6d8e Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Mon, 27 Jun 2022 19:14:22 +0300 Subject: [PATCH 13/16] Fix checkstyle --- .../elasticsearch/cluster/coordination/CoordinatorTests.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java index 2fc5245ebcfe1..275076dc5d870 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java @@ -2119,9 +2119,7 @@ public void testLogsWarningPeriodicallyIfSingleNodeClusterHasSeedHosts() throws final Settings settings; final String fakeSeedHost = buildNewFakeTransportAddress().toString(); if (randomBoolean()) { - settings = Settings.builder() - .putList(DISCOVERY_SEED_HOSTS_SETTING.getKey(), fakeSeedHost) - .build(); + settings = Settings.builder().putList(DISCOVERY_SEED_HOSTS_SETTING.getKey(), fakeSeedHost).build(); warningDelayMillis = Coordinator.SINGLE_NODE_CLUSTER_SEED_HOSTS_CHECK_INTERVAL_SETTING.get(settings).millis(); } else { warningDelayMillis = randomLongBetween(1, 100000); From 92c297225385e2bcade000d01ba7eb3e44427f40 Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Tue, 28 Jun 2022 09:16:00 +0300 Subject: [PATCH 14/16] Shorten warning text width --- .../cluster/coordination/Coordinator.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index 67c75f91fa139..b6ded209036ba 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -771,11 +771,11 @@ private void checkSingleNodeCluster() { } else { logger.warn( """ - This node is a fully-formed single-node cluster with cluster UUID [{}], but it is configured as if to discover \ - other nodes and form a multi-node cluster via the [{}] setting. 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.""", + This node is a fully-formed single-node cluster with cluster UUID [{}], but it is configured as if to \ + discover other nodes and form a multi-node cluster via the [{}] setting. 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.""", applierState.metadata().clusterUUID(), DISCOVERY_SEED_HOSTS_SETTING.getKey() + "=" + DISCOVERY_SEED_HOSTS_SETTING.get(settings) ); From 20cf4532c0ceda5120a4b9e373fa9ea17aa35659 Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Thu, 30 Jun 2022 14:52:57 +0300 Subject: [PATCH 15/16] Update docs/reference/modules/discovery/discovery-settings.asciidoc Co-authored-by: David Turner --- .../modules/discovery/discovery-settings.asciidoc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/reference/modules/discovery/discovery-settings.asciidoc b/docs/reference/modules/discovery/discovery-settings.asciidoc index 57785fb959217..c3410900896e6 100644 --- a/docs/reference/modules/discovery/discovery-settings.asciidoc +++ b/docs/reference/modules/discovery/discovery-settings.asciidoc @@ -201,11 +201,10 @@ Sets how long the master node waits for each cluster state update to be completely published to all nodes, unless `discovery.type` is set to `single-node`. The default value is `30s`. See <>. -`cluster.single_node_cluster_seed_hosts_check_interval`:: +`cluster.discovery_configuration_check.interval `:: (<>) -Sets the interval of the check that warns that seed hosts (see -`discovery.seed_hosts`) have been defined for a fully-formed single-node -cluster. The default value is `30s`. +Sets the interval of some checks that will log warnings about an +incorrect discovery configuration. The default value is `30s`. `cluster.join_validation.cache_timeout`:: (<>) From 56196f5d7dc55e60270e4abcb5b84d84573d1b33 Mon Sep 17 00:00:00 2001 From: Iraklis Psaroudakis Date: Thu, 30 Jun 2022 15:10:31 +0300 Subject: [PATCH 16/16] Change config name --- .../org/elasticsearch/cluster/coordination/Coordinator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java index b6ded209036ba..9cd1416280937 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java @@ -118,7 +118,7 @@ public class Coordinator extends AbstractLifecycleComponent implements ClusterSt ); public static final Setting SINGLE_NODE_CLUSTER_SEED_HOSTS_CHECK_INTERVAL_SETTING = Setting.timeSetting( - "cluster.single_node_cluster_seed_hosts_check_interval", + "cluster.discovery_configuration_check.interval", TimeValue.timeValueMillis(30000), TimeValue.timeValueMillis(1), Setting.Property.NodeScope