diff --git a/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterFormationTasks.groovy b/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterFormationTasks.groovy index c3dd2526de385..0c88c33921309 100644 --- a/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterFormationTasks.groovy +++ b/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterFormationTasks.groovy @@ -153,7 +153,8 @@ class ClusterFormationTasks { } boolean supportsInitialMasterNodes = hasBwcNodes == false || config.bwcVersion.onOrAfter("7.0.0") if (esConfig['discovery.type'] == null && config.getAutoSetInitialMasterNodes() && supportsInitialMasterNodes) { - esConfig['cluster.initial_master_nodes'] = nodes.stream().map({ n -> + // To promote inclusive language, the old setting name is deprecated in 2.0.0 + esConfig[node.nodeVersion.onOrAfter("2.0.0") ? 'cluster.initial_cluster_manager_nodes' : 'cluster.initial_master_nodes'] = nodes.stream().map({ n -> if (n.config.settings['node.name'] == null) { return "node-" + n.nodeNum } else { diff --git a/buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchCluster.java b/buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchCluster.java index a94ebacd460a5..ef52adab6377a 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchCluster.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchCluster.java @@ -361,7 +361,12 @@ private void commonNodeConfig(OpenSearchNode node, String nodeNames, OpenSearchN .collect(Collectors.toList()) .forEach(node.defaultConfig::remove); if (nodeNames != null && node.settings.getOrDefault("discovery.type", "anything").equals("single-node") == false) { - node.defaultConfig.put("cluster.initial_master_nodes", "[" + nodeNames + "]"); + // To promote inclusive language, the old setting name is deprecated n 2.0.0 + if (node.getVersion().onOrAfter("2.0.0")) { + node.defaultConfig.put("cluster.initial_cluster_manager_nodes", "[" + nodeNames + "]"); + } else { + node.defaultConfig.put("cluster.initial_master_nodes", "[" + nodeNames + "]"); + } } node.defaultConfig.put("discovery.seed_providers", "file"); node.defaultConfig.put("discovery.seed_hosts", "[]"); diff --git a/distribution/docker/docker-compose.yml b/distribution/docker/docker-compose.yml index f648a514e1db4..5ed2b159ffe2b 100644 --- a/distribution/docker/docker-compose.yml +++ b/distribution/docker/docker-compose.yml @@ -5,7 +5,7 @@ services: image: opensearch:test environment: - node.name=opensearch-1 - - cluster.initial_master_nodes=opensearch-1,opensearch-2 + - cluster.initial_cluster_manager_nodes=opensearch-1,opensearch-2 - discovery.seed_hosts=opensearch-2:9300 - cluster.name=opensearch - bootstrap.memory_lock=true @@ -29,7 +29,7 @@ services: image: opensearch:test environment: - node.name=opensearch-2 - - cluster.initial_master_nodes=opensearch-1,opensearch-2 + - cluster.initial_cluster_manager_nodes=opensearch-1,opensearch-2 - discovery.seed_hosts=opensearch-1:9300 - cluster.name=opensearch - bootstrap.memory_lock=true diff --git a/distribution/src/config/opensearch.yml b/distribution/src/config/opensearch.yml index accc920e6aa17..2188fbe600cbf 100644 --- a/distribution/src/config/opensearch.yml +++ b/distribution/src/config/opensearch.yml @@ -67,9 +67,9 @@ ${path.logs} # #discovery.seed_hosts: ["host1", "host2"] # -# Bootstrap the cluster using an initial set of master-eligible nodes: +# Bootstrap the cluster using an initial set of cluster-manager-eligible nodes: # -#cluster.initial_master_nodes: ["node-1", "node-2"] +#cluster.initial_cluster_manager_nodes: ["node-1", "node-2"] # # For more information, consult the discovery and cluster formation module documentation. # diff --git a/qa/remote-clusters/docker-compose.yml b/qa/remote-clusters/docker-compose.yml index 74aaa9e2a5271..cf6aefcf5c1a3 100644 --- a/qa/remote-clusters/docker-compose.yml +++ b/qa/remote-clusters/docker-compose.yml @@ -5,7 +5,7 @@ services: image: opensearch:test environment: - node.name=opensearch-1 - - cluster.initial_master_nodes=opensearch-1 + - cluster.initial_cluster_manager_nodes=opensearch-1 - cluster.name=opensearch-1 - bootstrap.memory_lock=true - network.publish_host=127.0.0.1 @@ -39,7 +39,7 @@ services: image: opensearch:test environment: - node.name=opensearch-2 - - cluster.initial_master_nodes=opensearch-2 + - cluster.initial_cluster_manager_nodes=opensearch-2 - cluster.name=opensearch-2 - bootstrap.memory_lock=true - network.publish_host=127.0.0.1 diff --git a/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterDisruptionIT.java index 53002a38c3a9d..ceec1315a9d59 100644 --- a/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterDisruptionIT.java @@ -422,7 +422,7 @@ public boolean clearData(String nodeName) { @Override public Settings onNodeStopped(String nodeName) { return Settings.builder() - .put(ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING.getKey(), nodeName) + .put(ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), nodeName) /* * the data node might join while the master is still not fully established as master just yet and bypasses the join * validation that is done before adding the node to the cluster. Only the join validation when handling the publish diff --git a/server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java b/server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java index 3c5f2828ff94f..d76e21ea712f3 100644 --- a/server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java @@ -83,7 +83,7 @@ import java.util.Set; import java.util.stream.IntStream; -import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; +import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING; import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; @@ -383,7 +383,7 @@ public void testTwoNodeFirstNodeCleared() throws Exception { public Settings onNodeStopped(String nodeName) { return Settings.builder() .put(RECOVER_AFTER_NODES_SETTING.getKey(), 2) - .putList(INITIAL_MASTER_NODES_SETTING.getKey()) // disable bootstrapping + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey()) // disable bootstrapping .build(); } diff --git a/server/src/main/java/org/opensearch/bootstrap/BootstrapChecks.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapChecks.java index e2072cae84733..79019a73c69e3 100644 --- a/server/src/main/java/org/opensearch/bootstrap/BootstrapChecks.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapChecks.java @@ -64,6 +64,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING; import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; import static org.opensearch.discovery.DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING; import static org.opensearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING; @@ -773,10 +774,12 @@ public BootstrapCheckResult check(BootstrapContext context) { return BootstrapCheckResult.failure( String.format( Locale.ROOT, - "the default discovery settings are unsuitable for production use; at least one of [%s] must be configured", - Stream.of(DISCOVERY_SEED_HOSTS_SETTING, DISCOVERY_SEED_PROVIDERS_SETTING, INITIAL_MASTER_NODES_SETTING) + // TODO: Remove ' / %s' from the error message after removing MASTER_ROLE, and update unit test. + "the default discovery settings are unsuitable for production use; at least one of [%s / %s] must be configured", + Stream.of(DISCOVERY_SEED_HOSTS_SETTING, DISCOVERY_SEED_PROVIDERS_SETTING, INITIAL_CLUSTER_MANAGER_NODES_SETTING) .map(Setting::getKey) - .collect(Collectors.joining(", ")) + .collect(Collectors.joining(", ")), + INITIAL_MASTER_NODES_SETTING.getKey() ) ); } diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java b/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java index 7f239aff2d5a8..ce34a21e4adb6 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java @@ -75,6 +75,15 @@ public class ClusterBootstrapService { "cluster.initial_master_nodes", emptyList(), Function.identity(), + Property.NodeScope, + Property.Deprecated + ); + // The setting below is going to replace the above. + // To keep backwards compatibility, the old usage is remained, and it's also used as the fallback for the new usage. + public static final Setting> INITIAL_CLUSTER_MANAGER_NODES_SETTING = Setting.listSetting( + "cluster.initial_cluster_manager_nodes", + INITIAL_MASTER_NODES_SETTING, + Function.identity(), Property.NodeScope ); @@ -105,10 +114,14 @@ public ClusterBootstrapService( Consumer votingConfigurationConsumer ) { if (DiscoveryModule.isSingleNodeDiscovery(settings)) { - if (INITIAL_MASTER_NODES_SETTING.exists(settings)) { + if (INITIAL_CLUSTER_MANAGER_NODES_SETTING.existsOrFallbackExists(settings)) { + // TODO: Remove variable 'initialClusterManagerSettingName' after removing MASTER_ROLE. + String initialClusterManagerSettingName = INITIAL_CLUSTER_MANAGER_NODES_SETTING.exists(settings) + ? INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey() + : INITIAL_MASTER_NODES_SETTING.getKey(); throw new IllegalArgumentException( "setting [" - + INITIAL_MASTER_NODES_SETTING.getKey() + + initialClusterManagerSettingName + "] is not allowed when [" + DiscoveryModule.DISCOVERY_TYPE_SETTING.getKey() + "] is set to [" @@ -128,11 +141,11 @@ public ClusterBootstrapService( bootstrapRequirements = Collections.singleton(Node.NODE_NAME_SETTING.get(settings)); unconfiguredBootstrapTimeout = null; } else { - final List initialMasterNodes = INITIAL_MASTER_NODES_SETTING.get(settings); + final List initialMasterNodes = INITIAL_CLUSTER_MANAGER_NODES_SETTING.get(settings); bootstrapRequirements = unmodifiableSet(new LinkedHashSet<>(initialMasterNodes)); if (bootstrapRequirements.size() != initialMasterNodes.size()) { throw new IllegalArgumentException( - "setting [" + INITIAL_MASTER_NODES_SETTING.getKey() + "] contains duplicates: " + initialMasterNodes + "setting [" + INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey() + "] contains duplicates: " + initialMasterNodes ); } unconfiguredBootstrapTimeout = discoveryIsConfigured(settings) ? null : UNCONFIGURED_BOOTSTRAP_TIMEOUT_SETTING.get(settings); @@ -150,7 +163,7 @@ public static boolean discoveryIsConfigured(Settings settings) { LEGACY_DISCOVERY_HOSTS_PROVIDER_SETTING, DISCOVERY_SEED_HOSTS_SETTING, LEGACY_DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING, - INITIAL_MASTER_NODES_SETTING + INITIAL_CLUSTER_MANAGER_NODES_SETTING ).anyMatch(s -> s.exists(settings)); } diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java b/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java index 394a33eb3cac3..c36a2983a011a 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java @@ -56,7 +56,7 @@ import java.util.stream.Collectors; import java.util.stream.StreamSupport; -import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; +import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING; import static org.opensearch.monitor.StatusInfo.Status.UNHEALTHY; public class ClusterFormationFailureHelper { @@ -198,13 +198,13 @@ String getDescription() { if (clusterState.getLastAcceptedConfiguration().isEmpty()) { final String bootstrappingDescription; - if (INITIAL_MASTER_NODES_SETTING.get(Settings.EMPTY).equals(INITIAL_MASTER_NODES_SETTING.get(settings))) { - bootstrappingDescription = "[" + INITIAL_MASTER_NODES_SETTING.getKey() + "] is empty on this node"; + if (INITIAL_CLUSTER_MANAGER_NODES_SETTING.get(Settings.EMPTY).equals(INITIAL_CLUSTER_MANAGER_NODES_SETTING.get(settings))) { + bootstrappingDescription = "[" + INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey() + "] is empty on this node"; } else { bootstrappingDescription = String.format( Locale.ROOT, "this node must discover master-eligible nodes %s to bootstrap a cluster", - INITIAL_MASTER_NODES_SETTING.get(settings) + INITIAL_CLUSTER_MANAGER_NODES_SETTING.get(settings) ); } diff --git a/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java b/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java index 308ab13a8a785..247898843296f 100644 --- a/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java +++ b/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java @@ -539,7 +539,8 @@ public void apply(Settings value, Settings current, Settings previous) { LeaderChecker.LEADER_CHECK_RETRY_COUNT_SETTING, Reconfigurator.CLUSTER_AUTO_SHRINK_VOTING_CONFIGURATION, TransportAddVotingConfigExclusionsAction.MAXIMUM_VOTING_CONFIG_EXCLUSIONS_SETTING, - ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING, + ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING, // deprecated + ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING, ClusterBootstrapService.UNCONFIGURED_BOOTSTRAP_TIMEOUT_SETTING, LagDetector.CLUSTER_FOLLOWER_LAG_TIMEOUT_SETTING, HandshakingTransportAddressConnector.PROBE_CONNECT_TIMEOUT_SETTING, diff --git a/server/src/test/java/org/opensearch/bootstrap/BootstrapChecksTests.java b/server/src/test/java/org/opensearch/bootstrap/BootstrapChecksTests.java index 04cc138061539..d941c624509da 100644 --- a/server/src/test/java/org/opensearch/bootstrap/BootstrapChecksTests.java +++ b/server/src/test/java/org/opensearch/bootstrap/BootstrapChecksTests.java @@ -802,7 +802,7 @@ public void testDiscoveryConfiguredCheck() throws NodeValidationException { hasToString( containsString( "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" + + "of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_cluster_manager_nodes / cluster.initial_master_nodes] must be configured" ) ) ); @@ -815,7 +815,7 @@ public void testDiscoveryConfiguredCheck() throws NodeValidationException { BootstrapChecks.check(context, true, checks); }; - ensureChecksPass.accept(Settings.builder().putList(ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING.getKey())); + ensureChecksPass.accept(Settings.builder().putList(ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey())); ensureChecksPass.accept(Settings.builder().putList(DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING.getKey())); ensureChecksPass.accept(Settings.builder().putList(SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING.getKey())); } diff --git a/server/src/test/java/org/opensearch/cluster/coordination/ClusterBootstrapServiceRenamedSettingTests.java b/server/src/test/java/org/opensearch/cluster/coordination/ClusterBootstrapServiceRenamedSettingTests.java new file mode 100644 index 0000000000000..09fb6a5ea256d --- /dev/null +++ b/server/src/test/java/org/opensearch/cluster/coordination/ClusterBootstrapServiceRenamedSettingTests.java @@ -0,0 +1,84 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.cluster.coordination; + +import org.opensearch.common.settings.ClusterSettings; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchTestCase; + +import java.util.Arrays; +import java.util.Set; + +/** + * A unit test to validate the former name of the setting 'cluster.initial_cluster_manager_nodes' still take effect, + * after it is deprecated, so that the backwards compatibility is maintained. + * The test can be removed along with removing support of the deprecated setting. + */ +public class ClusterBootstrapServiceRenamedSettingTests extends OpenSearchTestCase { + /** + * Validate the both settings are known and supported. + */ + public void testReindexSettingsExist() { + Set> settings = ClusterSettings.BUILT_IN_CLUSTER_SETTINGS; + assertTrue( + "Both 'cluster.initial_cluster_manager_nodes' and its predecessor should be supported built-in settings.", + settings.containsAll( + Arrays.asList( + ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING, + ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING + ) + ) + ); + } + + /** + * Validate the default value of the both settings is the same. + */ + public void testSettingFallback() { + assertEquals( + ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING.get(Settings.EMPTY), + ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING.get(Settings.EMPTY) + ); + } + + /** + * Validate the new setting can be configured correctly, and it doesn't impact the old setting. + */ + public void testSettingGetValue() { + Settings settings = Settings.builder().put("cluster.initial_cluster_manager_nodes", "node-a").build(); + assertEquals(Arrays.asList("node-a"), ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING.get(settings)); + assertEquals( + ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING.getDefault(Settings.EMPTY), + ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING.get(settings) + ); + } + + /** + * Validate the value of the old setting will be applied to the new setting, if the new setting is not configured. + */ + public void testSettingGetValueWithFallback() { + Settings settings = Settings.builder().put("cluster.initial_master_nodes", "node-a").build(); + assertEquals(Arrays.asList("node-a"), ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING.get(settings)); + assertSettingDeprecationsAndWarnings(new Setting[] { ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING }); + } + + /** + * Validate the value of the old setting will be ignored, if the new setting is configured. + */ + public void testSettingGetValueWhenBothAreConfigured() { + Settings settings = Settings.builder() + .put("cluster.initial_cluster_manager_nodes", "node-a") + .put("cluster.initial_master_nodes", "node-a, node-b") + .build(); + assertEquals(Arrays.asList("node-a"), ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING.get(settings)); + assertEquals(Arrays.asList("node-a", "node-b"), ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING.get(settings)); + assertSettingDeprecationsAndWarnings(new Setting[] { ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING }); + } +} diff --git a/server/src/test/java/org/opensearch/cluster/coordination/ClusterBootstrapServiceTests.java b/server/src/test/java/org/opensearch/cluster/coordination/ClusterBootstrapServiceTests.java index a2fe39ef4531e..d8007933c2559 100644 --- a/server/src/test/java/org/opensearch/cluster/coordination/ClusterBootstrapServiceTests.java +++ b/server/src/test/java/org/opensearch/cluster/coordination/ClusterBootstrapServiceTests.java @@ -57,6 +57,7 @@ import static java.util.Collections.emptySet; import static java.util.Collections.singletonList; import static org.opensearch.cluster.coordination.ClusterBootstrapService.BOOTSTRAP_PLACEHOLDER_PREFIX; +import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING; import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; import static org.opensearch.cluster.coordination.ClusterBootstrapService.UNCONFIGURED_BOOTSTRAP_TIMEOUT_SETTING; import static org.opensearch.common.settings.Settings.builder; @@ -166,7 +167,7 @@ public void testDoesNothingByDefaultIfSeedHostsConfigured() { } public void testDoesNothingByDefaultIfMasterNodesConfigured() { - testDoesNothingWithSettings(builder().putList(INITIAL_MASTER_NODES_SETTING.getKey())); + testDoesNothingWithSettings(builder().putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey())); } public void testDoesNothingByDefaultOnMasterIneligibleNodes() { @@ -197,7 +198,7 @@ private void testDoesNothingWithSettings(Settings.Builder builder) { public void testThrowsExceptionOnDuplicates() { final IllegalArgumentException illegalArgumentException = expectThrows(IllegalArgumentException.class, () -> { new ClusterBootstrapService( - builder().putList(INITIAL_MASTER_NODES_SETTING.getKey(), "duplicate-requirement", "duplicate-requirement").build(), + builder().putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), "duplicate-requirement", "duplicate-requirement").build(), transportService, Collections::emptyList, () -> false, @@ -205,7 +206,7 @@ public void testThrowsExceptionOnDuplicates() { ); }); - assertThat(illegalArgumentException.getMessage(), containsString(INITIAL_MASTER_NODES_SETTING.getKey())); + assertThat(illegalArgumentException.getMessage(), containsString(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey())); assertThat(illegalArgumentException.getMessage(), containsString("duplicate-requirement")); } @@ -214,7 +215,7 @@ public void testBootstrapsOnDiscoveryOfAllRequiredNodes() { ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( Settings.builder() - .putList(INITIAL_MASTER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) .build(), transportService, () -> Stream.of(otherNode1, otherNode2).collect(Collectors.toList()), @@ -242,7 +243,7 @@ public void testBootstrapsOnDiscoveryOfTwoOfThreeRequiredNodes() { ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( Settings.builder() - .putList(INITIAL_MASTER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) .build(), transportService, () -> singletonList(otherNode1), @@ -276,7 +277,7 @@ public void testBootstrapsOnDiscoveryOfThreeOfFiveRequiredNodes() { ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( Settings.builder() .putList( - INITIAL_MASTER_NODES_SETTING.getKey(), + INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName(), @@ -325,7 +326,7 @@ public void testBootstrapsOnDiscoveryOfThreeOfFiveRequiredNodes() { public void testDoesNotBootstrapIfNoNodesDiscovered() { ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( Settings.builder() - .putList(INITIAL_MASTER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) .build(), transportService, Collections::emptyList, @@ -342,7 +343,7 @@ public void testDoesNotBootstrapIfTwoOfFiveNodesDiscovered() { ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( Settings.builder() .putList( - INITIAL_MASTER_NODES_SETTING.getKey(), + INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName(), @@ -365,7 +366,7 @@ public void testDoesNotBootstrapIfThreeOfSixNodesDiscovered() { ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( Settings.builder() .putList( - INITIAL_MASTER_NODES_SETTING.getKey(), + INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName(), @@ -388,7 +389,7 @@ public void testDoesNotBootstrapIfThreeOfSixNodesDiscovered() { public void testDoesNotBootstrapIfAlreadyBootstrapped() { ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( Settings.builder() - .putList(INITIAL_MASTER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) .build(), transportService, () -> Stream.of(otherNode1, otherNode2).collect(Collectors.toList()), @@ -412,7 +413,7 @@ public void testDoesNotBootstrapsOnNonMasterNode() { ); ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( Settings.builder() - .putList(INITIAL_MASTER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) .build(), transportService, () -> Stream.of(localNode, otherNode1, otherNode2).collect(Collectors.toList()), @@ -424,9 +425,9 @@ public void testDoesNotBootstrapsOnNonMasterNode() { deterministicTaskQueue.runAllTasks(); } - public void testDoesNotBootstrapsIfLocalNodeNotInInitialMasterNodes() { + public void testDoesNotBootstrapsIfLocalNodeNotInInitialClusterManagerNodes() { ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( - Settings.builder().putList(INITIAL_MASTER_NODES_SETTING.getKey(), otherNode1.getName(), otherNode2.getName()).build(), + Settings.builder().putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), otherNode1.getName(), otherNode2.getName()).build(), transportService, () -> Stream.of(localNode, otherNode1, otherNode2).collect(Collectors.toList()), () -> false, @@ -439,7 +440,7 @@ public void testDoesNotBootstrapsIfLocalNodeNotInInitialMasterNodes() { public void testDoesNotBootstrapsIfNotConfigured() { ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( - Settings.builder().putList(INITIAL_MASTER_NODES_SETTING.getKey()).build(), + Settings.builder().putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey()).build(), transportService, () -> Stream.of(localNode, otherNode1, otherNode2).collect(Collectors.toList()), () -> false, @@ -455,7 +456,7 @@ public void testRetriesBootstrappingOnException() { final AtomicLong bootstrappingAttempts = new AtomicLong(); ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( Settings.builder() - .putList(INITIAL_MASTER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) .build(), transportService, () -> Stream.of(otherNode1, otherNode2).collect(Collectors.toList()), @@ -480,7 +481,7 @@ public void testCancelsBootstrapIfRequirementMatchesMultipleNodes() { Stream.of(otherNode1, otherNode2).collect(Collectors.toList()) ); ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( - Settings.builder().putList(INITIAL_MASTER_NODES_SETTING.getKey(), localNode.getAddress().getAddress()).build(), + Settings.builder().putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getAddress().getAddress()).build(), transportService, discoveredNodes::get, () -> false, @@ -502,7 +503,7 @@ public void testCancelsBootstrapIfNodeMatchesMultipleRequirements() { ); ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( Settings.builder() - .putList(INITIAL_MASTER_NODES_SETTING.getKey(), otherNode1.getAddress().toString(), otherNode1.getName()) + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), otherNode1.getAddress().toString(), otherNode1.getName()) .build(), transportService, discoveredNodes::get, @@ -542,7 +543,7 @@ public void testCancelsBootstrapIfNodeMatchesMultipleRequirements() { public void testMatchesOnNodeName() { final AtomicBoolean bootstrapped = new AtomicBoolean(); ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( - Settings.builder().putList(INITIAL_MASTER_NODES_SETTING.getKey(), localNode.getName()).build(), + Settings.builder().putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getName()).build(), transportService, Collections::emptyList, () -> false, @@ -558,7 +559,7 @@ public void testMatchesOnNodeName() { public void testMatchesOnNodeAddress() { final AtomicBoolean bootstrapped = new AtomicBoolean(); ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( - Settings.builder().putList(INITIAL_MASTER_NODES_SETTING.getKey(), localNode.getAddress().toString()).build(), + Settings.builder().putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getAddress().toString()).build(), transportService, Collections::emptyList, () -> false, @@ -574,7 +575,7 @@ public void testMatchesOnNodeAddress() { public void testMatchesOnNodeHostAddress() { final AtomicBoolean bootstrapped = new AtomicBoolean(); ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( - Settings.builder().putList(INITIAL_MASTER_NODES_SETTING.getKey(), localNode.getAddress().getAddress()).build(), + Settings.builder().putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getAddress().getAddress()).build(), transportService, Collections::emptyList, () -> false, @@ -589,7 +590,7 @@ public void testMatchesOnNodeHostAddress() { public void testDoesNotJustMatchEverything() { ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( - Settings.builder().putList(INITIAL_MASTER_NODES_SETTING.getKey(), randomAlphaOfLength(10)).build(), + Settings.builder().putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), randomAlphaOfLength(10)).build(), transportService, Collections::emptyList, () -> false, @@ -606,7 +607,7 @@ public void testDoesNotIncludeExtraNodes() { final AtomicBoolean bootstrapped = new AtomicBoolean(); ClusterBootstrapService clusterBootstrapService = new ClusterBootstrapService( Settings.builder() - .putList(INITIAL_MASTER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), localNode.getName(), otherNode1.getName(), otherNode2.getName()) .build(), transportService, () -> Stream.of(otherNode1, otherNode2, extraNode).collect(Collectors.toList()), @@ -670,6 +671,29 @@ public void testFailBootstrapWithBothSingleNodeDiscoveryAndInitialMasterNodes() ); } + /** + * Validate the correct setting name of cluster.initial_cluster_manager_nodes is shown in the exception, + * when discovery type is single-node. + */ + public void testFailBootstrapWithBothSingleNodeDiscoveryAndInitialClusterManagerNodes() { + final Settings.Builder settings = Settings.builder() + .put(DiscoveryModule.DISCOVERY_TYPE_SETTING.getKey(), DiscoveryModule.SINGLE_NODE_DISCOVERY_TYPE) + .put(NODE_NAME_SETTING.getKey(), localNode.getName()) + .put(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), "test"); + + assertThat( + expectThrows( + IllegalArgumentException.class, + () -> new ClusterBootstrapService(settings.build(), transportService, () -> emptyList(), () -> false, vc -> fail()) + ).getMessage(), + containsString( + "setting [" + + INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey() + + "] is not allowed when [discovery.type] is set to [single-node]" + ) + ); + } + public void testFailBootstrapNonMasterEligibleNodeWithSingleNodeDiscovery() { final Settings.Builder settings = Settings.builder() .put(DiscoveryModule.DISCOVERY_TYPE_SETTING.getKey(), DiscoveryModule.SINGLE_NODE_DISCOVERY_TYPE) diff --git a/server/src/test/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelperTests.java b/server/src/test/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelperTests.java index c53c6fb8f4a18..4288d4eb5d53b 100644 --- a/server/src/test/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelperTests.java +++ b/server/src/test/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelperTests.java @@ -56,7 +56,7 @@ import static java.util.Collections.emptySet; import static java.util.Collections.singletonList; import static org.opensearch.cluster.coordination.ClusterBootstrapService.BOOTSTRAP_PLACEHOLDER_PREFIX; -import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; +import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING; import static org.opensearch.monitor.StatusInfo.Status.HEALTHY; import static org.opensearch.monitor.StatusInfo.Status.UNHEALTHY; import static org.opensearch.node.Node.NODE_NAME_SETTING; @@ -329,7 +329,7 @@ public void testDescriptionBeforeBootstrapping() { ).getDescription(), is( "master not discovered yet, this node has not previously joined a bootstrapped cluster, and " - + "[cluster.initial_master_nodes] is empty on this node: have discovered []; " + + "[cluster.initial_cluster_manager_nodes] is empty on this node: have discovered []; " + "discovery will continue using [] from hosts providers and [" + localNode + "] from last-known cluster state; node term 1, last-accepted version 7 in term 4" @@ -349,7 +349,7 @@ public void testDescriptionBeforeBootstrapping() { ).getDescription(), is( "master not discovered yet, this node has not previously joined a bootstrapped cluster, and " - + "[cluster.initial_master_nodes] is empty on this node: have discovered []; " + + "[cluster.initial_cluster_manager_nodes] is empty on this node: have discovered []; " + "discovery will continue using [" + otherAddress + "] from hosts providers and [" @@ -371,7 +371,7 @@ public void testDescriptionBeforeBootstrapping() { ).getDescription(), is( "master not discovered yet, this node has not previously joined a bootstrapped cluster, and " - + "[cluster.initial_master_nodes] is empty on this node: have discovered [" + + "[cluster.initial_cluster_manager_nodes] is empty on this node: have discovered [" + otherNode + "]; " + "discovery will continue using [] from hosts providers and [" @@ -382,7 +382,7 @@ public void testDescriptionBeforeBootstrapping() { assertThat( new ClusterFormationState( - Settings.builder().putList(INITIAL_MASTER_NODES_SETTING.getKey(), "other").build(), + Settings.builder().putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), "other").build(), clusterState, emptyList(), emptyList(), diff --git a/server/src/test/java/org/opensearch/indices/IndicesServiceCloseTests.java b/server/src/test/java/org/opensearch/indices/IndicesServiceCloseTests.java index ff97b87708202..e3b2afaccf054 100644 --- a/server/src/test/java/org/opensearch/indices/IndicesServiceCloseTests.java +++ b/server/src/test/java/org/opensearch/indices/IndicesServiceCloseTests.java @@ -64,7 +64,7 @@ import java.util.Collections; import java.util.concurrent.TimeUnit; -import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; +import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING; import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; import static org.opensearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING; @@ -94,7 +94,7 @@ private Node startNode() throws NodeValidationException { // turn it off for these tests. .put(HierarchyCircuitBreakerService.USE_REAL_MEMORY_USAGE_SETTING.getKey(), false) .putList(DISCOVERY_SEED_HOSTS_SETTING.getKey()) // empty list disables a port scan for other nodes - .putList(INITIAL_MASTER_NODES_SETTING.getKey(), nodeName) + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), nodeName) .put(IndicesQueryCache.INDICES_QUERIES_CACHE_ALL_SEGMENTS_SETTING.getKey(), true) .build(); diff --git a/server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java b/server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java index 74da44af28e1d..5e7def04fe8c8 100644 --- a/server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java +++ b/server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java @@ -1445,8 +1445,8 @@ private Environment createEnvironment(String nodeName) { .put(PATH_HOME_SETTING.getKey(), tempDir.resolve(nodeName).toAbsolutePath()) .put(Environment.PATH_REPO_SETTING.getKey(), tempDir.resolve("repo").toAbsolutePath()) .putList( - ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING.getKey(), - ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING.get(Settings.EMPTY) + ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), + ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING.get(Settings.EMPTY) ) .put(MappingUpdatedAction.INDICES_MAX_IN_FLIGHT_UPDATES_SETTING.getKey(), 1000) // o.w. some tests might block .build() diff --git a/test/framework/src/main/java/org/opensearch/cluster/coordination/AbstractCoordinatorTestCase.java b/test/framework/src/main/java/org/opensearch/cluster/coordination/AbstractCoordinatorTestCase.java index 828496ebfa3a4..9841daa5f81b7 100644 --- a/test/framework/src/main/java/org/opensearch/cluster/coordination/AbstractCoordinatorTestCase.java +++ b/test/framework/src/main/java/org/opensearch/cluster/coordination/AbstractCoordinatorTestCase.java @@ -1089,8 +1089,8 @@ protected Optional getDisruptableMockTransport(Transpo : Settings.builder() .put(nodeSettings) .putList( - ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING.getKey(), - ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING.get(Settings.EMPTY) + ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), + ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING.get(Settings.EMPTY) ) .build(); // suppress auto-bootstrap transportService = mockTransport.createTransportService( diff --git a/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java b/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java index 11b39f0ff8da1..8000582793a95 100644 --- a/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java +++ b/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java @@ -157,7 +157,7 @@ import static org.apache.lucene.tests.util.LuceneTestCase.TEST_NIGHTLY; import static org.apache.lucene.tests.util.LuceneTestCase.rarely; -import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; +import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING; import static org.opensearch.common.unit.TimeValue.timeValueMillis; import static org.opensearch.common.unit.TimeValue.timeValueSeconds; import static org.opensearch.discovery.DiscoveryModule.DISCOVERY_TYPE_SETTING; @@ -616,7 +616,7 @@ private NodeAndClient getOrBuildRandomNode() { final int nodeId = nextNodeId.getAndIncrement(); final Settings settings = getNodeSettings(nodeId, random.nextLong(), Settings.EMPTY, 1); final Settings nodeSettings = Settings.builder() - .putList(INITIAL_MASTER_NODES_SETTING.getKey(), Node.NODE_NAME_SETTING.get(settings)) + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), Node.NODE_NAME_SETTING.get(settings)) .put(settings) .build(); final NodeAndClient buildNode = buildNode(nodeId, nodeSettings, false, onTransportServiceStarted); @@ -990,8 +990,8 @@ Settings closeForRestart(RestartCallback callback, int minMasterNodes) throws Ex Settings.Builder newSettings = Settings.builder(); newSettings.put(callbackSettings); if (minMasterNodes >= 0) { - if (INITIAL_MASTER_NODES_SETTING.exists(callbackSettings) == false) { - newSettings.putList(INITIAL_MASTER_NODES_SETTING.getKey()); + if (INITIAL_CLUSTER_MANAGER_NODES_SETTING.exists(callbackSettings) == false) { + newSettings.putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey()); } } // delete data folders now, before we start other nodes that may claim it @@ -1174,7 +1174,10 @@ private synchronized void reset(boolean wipeData) throws IOException { for (int i = 0; i < numSharedDedicatedMasterNodes + numSharedDataNodes + numSharedCoordOnlyNodes; i++) { Settings nodeSettings = updatedSettings.get(i); if (i == autoBootstrapMasterNodeIndex) { - nodeSettings = Settings.builder().putList(INITIAL_MASTER_NODES_SETTING.getKey(), masterNodeNames).put(nodeSettings).build(); + nodeSettings = Settings.builder() + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), masterNodeNames) + .put(nodeSettings) + .build(); } final NodeAndClient nodeAndClient = buildNode(i, nodeSettings, true, onTransportServiceStarted); toStartAndPublish.add(nodeAndClient); @@ -2034,7 +2037,7 @@ private List bootstrapMasterNodeWithSpecifiedIndex(List allN newSettings.add( Settings.builder() .put(settings) - .putList(ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING.getKey(), nodeNames) + .putList(ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), nodeNames) .build() ); @@ -2122,7 +2125,7 @@ public synchronized List startNodes(Settings... extraSettings) { final Builder builder = Settings.builder(); if (DiscoveryNode.isMasterNode(nodeSettings)) { if (autoBootstrapMasterNodeIndex == 0) { - builder.putList(INITIAL_MASTER_NODES_SETTING.getKey(), initialMasterNodes); + builder.putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), initialMasterNodes); } autoBootstrapMasterNodeIndex -= 1; } diff --git a/test/framework/src/main/java/org/opensearch/test/OpenSearchSingleNodeTestCase.java b/test/framework/src/main/java/org/opensearch/test/OpenSearchSingleNodeTestCase.java index fb4831f881092..6391b4dad9a30 100644 --- a/test/framework/src/main/java/org/opensearch/test/OpenSearchSingleNodeTestCase.java +++ b/test/framework/src/main/java/org/opensearch/test/OpenSearchSingleNodeTestCase.java @@ -78,7 +78,7 @@ import java.util.Collections; import java.util.concurrent.TimeUnit; -import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; +import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING; import static org.opensearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING; import static org.opensearch.test.NodeRoles.dataNode; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; @@ -241,7 +241,7 @@ private Node newNode() { // turn it off for these tests. .put(HierarchyCircuitBreakerService.USE_REAL_MEMORY_USAGE_SETTING.getKey(), false) .putList(DISCOVERY_SEED_HOSTS_SETTING.getKey()) // empty list disables a port scan for other nodes - .putList(INITIAL_MASTER_NODES_SETTING.getKey(), nodeName) + .putList(INITIAL_CLUSTER_MANAGER_NODES_SETTING.getKey(), nodeName) .put(nodeSettings()) // allow test cases to provide their own settings or override these .build();