mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-28 02:48:38 +00:00
Deprecate unused Zen1 settings (#38289)
Today the following settings in the `discovery.zen` namespace are still used: - `discovery.zen.no_master_block` - `discovery.zen.hosts_provider` - `discovery.zen.ping.unicast.concurrent_connects` - `discovery.zen.ping.unicast.hosts.resolve_timeout` - `discovery.zen.ping.unicast.hosts` This commit deprecates all other settings in this namespace so that they can be removed in the next major version.
This commit is contained in:
parent
4561f425db
commit
1d82a6d9f9
plugins
discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic
discovery-gce/src/test/java/org/elasticsearch/discovery/gce
server/src
main/java/org/elasticsearch
cluster/coordination
discovery
test/java/org/elasticsearch
action/support/master
cluster
discovery
AbstractDisruptionTestCase.javaClusterDisruptionIT.javaSnapshotDisruptionIT.javaZenFaultDetectionTests.java
zen
recovery
test/framework/src/test/java/org/elasticsearch/test/test
x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration
@ -35,7 +35,6 @@ import org.elasticsearch.common.network.NetworkService;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.transport.TransportAddress;
|
||||
import org.elasticsearch.discovery.azure.classic.AzureUnicastHostsProvider;
|
||||
import org.elasticsearch.discovery.zen.ZenDiscovery;
|
||||
import org.elasticsearch.plugin.discovery.azure.classic.AzureDiscoveryPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
@ -66,10 +65,6 @@ public abstract class AbstractAzureComputeServiceTestCase extends ESIntegTestCas
|
||||
.put(super.nodeSettings(nodeOrdinal))
|
||||
.put("discovery.zen.hosts_provider", "azure");
|
||||
|
||||
// Make the test run faster
|
||||
builder.put(ZenDiscovery.JOIN_TIMEOUT_SETTING.getKey(), "1s")
|
||||
.put(ZenDiscovery.PING_TIMEOUT_SETTING.getKey(), "500ms");
|
||||
|
||||
// We add a fake subscription_id to start mock compute service
|
||||
builder.put(Management.SUBSCRIPTION_ID_SETTING.getKey(), "fake")
|
||||
.put(Discovery.REFRESH_SETTING.getKey(), "5s")
|
||||
|
@ -26,7 +26,6 @@ import org.elasticsearch.cloud.gce.GceInstancesService;
|
||||
import org.elasticsearch.cloud.gce.util.Access;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.discovery.zen.ZenDiscovery;
|
||||
import org.elasticsearch.plugin.discovery.gce.GceDiscoveryPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
@ -43,7 +42,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import static java.util.Collections.singletonList;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout;
|
||||
|
||||
|
||||
@ESIntegTestCase.ClusterScope(supportsDedicatedMasters = false, numDataNodes = 0, numClientNodes = 0)
|
||||
public class GceDiscoverTests extends ESIntegTestCase {
|
||||
|
||||
@ -67,9 +65,6 @@ public class GceDiscoverTests extends ESIntegTestCase {
|
||||
.put("discovery.zen.hosts_provider", "gce")
|
||||
.put("cloud.gce.project_id", "test")
|
||||
.put("cloud.gce.zone", "test")
|
||||
// Make the test run faster
|
||||
.put(ZenDiscovery.JOIN_TIMEOUT_SETTING.getKey(), "1s")
|
||||
.put(ZenDiscovery.PING_TIMEOUT_SETTING.getKey(), "500ms")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -77,11 +77,11 @@ public class DiscoveryUpgradeService {
|
||||
// how long to wait after activation before attempting to join a master or perform a bootstrap upgrade
|
||||
public static final Setting<TimeValue> BWC_PING_TIMEOUT_SETTING =
|
||||
Setting.timeSetting("discovery.zen.bwc_ping_timeout",
|
||||
PING_TIMEOUT_SETTING, TimeValue.timeValueMillis(1), Setting.Property.NodeScope);
|
||||
PING_TIMEOUT_SETTING, TimeValue.timeValueMillis(1), Setting.Property.NodeScope, Setting.Property.Deprecated);
|
||||
|
||||
// whether to try and bootstrap all the discovered Zen2 nodes when the last Zen1 node leaves the cluster.
|
||||
public static final Setting<Boolean> ENABLE_UNSAFE_BOOTSTRAPPING_ON_UPGRADE_SETTING =
|
||||
Setting.boolSetting("discovery.zen.unsafe_rolling_upgrades_enabled", true, Setting.Property.NodeScope);
|
||||
Setting.boolSetting("discovery.zen.unsafe_rolling_upgrades_enabled", true, Setting.Property.NodeScope, Setting.Property.Deprecated);
|
||||
|
||||
/**
|
||||
* Dummy {@link ElectMasterService} that is only used to choose the best 6.x master from the discovered nodes, ignoring the
|
||||
|
@ -46,21 +46,21 @@ public class DiscoverySettings {
|
||||
**/
|
||||
public static final Setting<TimeValue> PUBLISH_TIMEOUT_SETTING =
|
||||
Setting.positiveTimeSetting("discovery.zen.publish_timeout", TimeValue.timeValueSeconds(30),
|
||||
Property.Dynamic, Property.NodeScope);
|
||||
Property.Dynamic, Property.NodeScope, Property.Deprecated);
|
||||
|
||||
/**
|
||||
* sets the timeout for receiving enough acks for a specific cluster state and committing it. failing
|
||||
* to receive responses within this window will cause the cluster state change to be rejected.
|
||||
*/
|
||||
public static final Setting<TimeValue> COMMIT_TIMEOUT_SETTING =
|
||||
new Setting<>("discovery.zen.commit_timeout", (s) -> PUBLISH_TIMEOUT_SETTING.getRaw(s),
|
||||
new Setting<>("discovery.zen.commit_timeout", PUBLISH_TIMEOUT_SETTING::getRaw,
|
||||
(s) -> TimeValue.parseTimeValue(s, TimeValue.timeValueSeconds(30), "discovery.zen.commit_timeout"),
|
||||
Property.Dynamic, Property.NodeScope);
|
||||
Property.Dynamic, Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<ClusterBlock> NO_MASTER_BLOCK_SETTING =
|
||||
new Setting<>("discovery.zen.no_master_block", "write", DiscoverySettings::parseNoMasterBlock,
|
||||
Property.Dynamic, Property.NodeScope);
|
||||
public static final Setting<Boolean> PUBLISH_DIFF_ENABLE_SETTING =
|
||||
Setting.boolSetting("discovery.zen.publish_diff.enable", true, Property.Dynamic, Property.NodeScope);
|
||||
Setting.boolSetting("discovery.zen.publish_diff.enable", true, Property.Dynamic, Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<TimeValue> INITIAL_STATE_TIMEOUT_SETTING =
|
||||
Setting.positiveTimeSetting("discovery.initial_state_timeout", TimeValue.timeValueSeconds(30), Property.NodeScope);
|
||||
|
||||
|
@ -45,15 +45,15 @@ public abstract class FaultDetection implements Closeable {
|
||||
private static final Logger logger = LogManager.getLogger(FaultDetection.class);
|
||||
|
||||
public static final Setting<Boolean> CONNECT_ON_NETWORK_DISCONNECT_SETTING =
|
||||
Setting.boolSetting("discovery.zen.fd.connect_on_network_disconnect", false, Property.NodeScope);
|
||||
Setting.boolSetting("discovery.zen.fd.connect_on_network_disconnect", false, Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<TimeValue> PING_INTERVAL_SETTING =
|
||||
Setting.positiveTimeSetting("discovery.zen.fd.ping_interval", timeValueSeconds(1), Property.NodeScope);
|
||||
Setting.positiveTimeSetting("discovery.zen.fd.ping_interval", timeValueSeconds(1), Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<TimeValue> PING_TIMEOUT_SETTING =
|
||||
Setting.timeSetting("discovery.zen.fd.ping_timeout", timeValueSeconds(30), Property.NodeScope);
|
||||
Setting.timeSetting("discovery.zen.fd.ping_timeout", timeValueSeconds(30), Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<Integer> PING_RETRIES_SETTING =
|
||||
Setting.intSetting("discovery.zen.fd.ping_retries", 3, Property.NodeScope);
|
||||
Setting.intSetting("discovery.zen.fd.ping_retries", 3, Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<Boolean> REGISTER_CONNECTION_LISTENER_SETTING =
|
||||
Setting.boolSetting("discovery.zen.fd.register_connection_listener", true, Property.NodeScope);
|
||||
Setting.boolSetting("discovery.zen.fd.register_connection_listener", true, Property.NodeScope, Property.Deprecated);
|
||||
|
||||
protected final ThreadPool threadPool;
|
||||
protected final ClusterName clusterName;
|
||||
|
@ -96,23 +96,24 @@ public class ZenDiscovery extends AbstractLifecycleComponent implements Discover
|
||||
public static final Setting<TimeValue> JOIN_TIMEOUT_SETTING =
|
||||
Setting.timeSetting("discovery.zen.join_timeout",
|
||||
settings -> TimeValue.timeValueMillis(PING_TIMEOUT_SETTING.get(settings).millis() * 20),
|
||||
TimeValue.timeValueMillis(0), Property.NodeScope);
|
||||
TimeValue.timeValueMillis(0), Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<Integer> JOIN_RETRY_ATTEMPTS_SETTING =
|
||||
Setting.intSetting("discovery.zen.join_retry_attempts", 3, 1, Property.NodeScope);
|
||||
Setting.intSetting("discovery.zen.join_retry_attempts", 3, 1, Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<TimeValue> JOIN_RETRY_DELAY_SETTING =
|
||||
Setting.positiveTimeSetting("discovery.zen.join_retry_delay", TimeValue.timeValueMillis(100), Property.NodeScope);
|
||||
Setting.positiveTimeSetting("discovery.zen.join_retry_delay", TimeValue.timeValueMillis(100),
|
||||
Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<Integer> MAX_PINGS_FROM_ANOTHER_MASTER_SETTING =
|
||||
Setting.intSetting("discovery.zen.max_pings_from_another_master", 3, 1, Property.NodeScope);
|
||||
Setting.intSetting("discovery.zen.max_pings_from_another_master", 3, 1, Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<Boolean> SEND_LEAVE_REQUEST_SETTING =
|
||||
Setting.boolSetting("discovery.zen.send_leave_request", true, Property.NodeScope);
|
||||
Setting.boolSetting("discovery.zen.send_leave_request", true, Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<TimeValue> MASTER_ELECTION_WAIT_FOR_JOINS_TIMEOUT_SETTING =
|
||||
Setting.timeSetting("discovery.zen.master_election.wait_for_joins_timeout",
|
||||
settings -> TimeValue.timeValueMillis(JOIN_TIMEOUT_SETTING.get(settings).millis() / 2), TimeValue.timeValueMillis(0),
|
||||
Property.NodeScope);
|
||||
Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<Boolean> MASTER_ELECTION_IGNORE_NON_MASTER_PINGS_SETTING =
|
||||
Setting.boolSetting("discovery.zen.master_election.ignore_non_master_pings", false, Property.NodeScope);
|
||||
Setting.boolSetting("discovery.zen.master_election.ignore_non_master_pings", false, Property.NodeScope, Property.Deprecated);
|
||||
public static final Setting<Integer> MAX_PENDING_CLUSTER_STATES_SETTING =
|
||||
Setting.intSetting("discovery.zen.publish.max_pending_cluster_states", 25, 1, Property.NodeScope);
|
||||
Setting.intSetting("discovery.zen.publish.max_pending_cluster_states", 25, 1, Property.NodeScope, Property.Deprecated);
|
||||
|
||||
public static final String DISCOVERY_REJOIN_ACTION_NAME = "internal:discovery/zen/rejoin";
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
package org.elasticsearch.action.support.master;
|
||||
|
||||
/*
|
||||
* Licensed to Elasticsearch under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
@ -18,12 +16,11 @@ package org.elasticsearch.action.support.master;
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.action.support.master;
|
||||
|
||||
import org.elasticsearch.action.DocWriteResponse;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.discovery.DiscoverySettings;
|
||||
import org.elasticsearch.discovery.zen.FaultDetection;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.discovery.TestZenDiscovery;
|
||||
@ -69,10 +66,7 @@ public class IndexingMasterFailoverIT extends ESIntegTestCase {
|
||||
logger.info("--> start 4 nodes, 3 master, 1 data");
|
||||
|
||||
final Settings sharedSettings = Settings.builder()
|
||||
.put(FaultDetection.PING_TIMEOUT_SETTING.getKey(), "1s") // for hitting simulated network failures quickly
|
||||
.put(FaultDetection.PING_RETRIES_SETTING.getKey(), "1") // for hitting simulated network failures quickly
|
||||
.put("cluster.join.timeout", "10s") // still long to induce failures but not too long so test won't time out
|
||||
.put(DiscoverySettings.PUBLISH_TIMEOUT_SETTING.getKey(), "1s") // <-- for hitting simulated network failures quickly
|
||||
.build();
|
||||
|
||||
internalCluster().setBootstrapMasterNodeIndex(2);
|
||||
|
@ -32,7 +32,6 @@ import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.discovery.DiscoverySettings;
|
||||
import org.elasticsearch.discovery.zen.ZenDiscovery;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
@ -75,7 +74,6 @@ public class MinimumMasterNodesIT extends ESIntegTestCase {
|
||||
internalCluster().setBootstrapMasterNodeIndex(1);
|
||||
|
||||
Settings settings = Settings.builder()
|
||||
.put(ZenDiscovery.PING_TIMEOUT_SETTING.getKey(), "200ms")
|
||||
.put("discovery.initial_state_timeout", "500ms")
|
||||
.build();
|
||||
|
||||
@ -208,7 +206,6 @@ public class MinimumMasterNodesIT extends ESIntegTestCase {
|
||||
internalCluster().setBootstrapMasterNodeIndex(2);
|
||||
|
||||
Settings settings = Settings.builder()
|
||||
.put(ZenDiscovery.PING_TIMEOUT_SETTING.getKey(), "1s")
|
||||
.put("discovery.initial_state_timeout", "500ms")
|
||||
.build();
|
||||
|
||||
@ -283,9 +280,7 @@ public class MinimumMasterNodesIT extends ESIntegTestCase {
|
||||
internalCluster().setBootstrapMasterNodeIndex(2);
|
||||
|
||||
Settings settings = Settings.builder()
|
||||
.put(ZenDiscovery.PING_TIMEOUT_SETTING.getKey(), "200ms")
|
||||
.put("discovery.initial_state_timeout", "500ms")
|
||||
.put(DiscoverySettings.COMMIT_TIMEOUT_SETTING.getKey(), "100ms") // speed things up
|
||||
.build();
|
||||
|
||||
internalCluster().startNodes(3, settings);
|
||||
|
@ -20,7 +20,6 @@
|
||||
package org.elasticsearch.cluster.allocation;
|
||||
|
||||
import com.carrotsearch.hppc.ObjectIntHashMap;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
@ -31,7 +30,6 @@ import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.AwarenessAllocationDecider;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.discovery.zen.ZenDiscovery;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
|
||||
@ -105,7 +103,6 @@ public class AwarenessAllocationIT extends ESIntegTestCase {
|
||||
Settings commonSettings = Settings.builder()
|
||||
.put(AwarenessAllocationDecider.CLUSTER_ROUTING_ALLOCATION_AWARENESS_FORCE_GROUP_SETTING.getKey() + "zone.values", "a,b")
|
||||
.put(AwarenessAllocationDecider.CLUSTER_ROUTING_ALLOCATION_AWARENESS_ATTRIBUTE_SETTING.getKey(), "zone")
|
||||
.put(ZenDiscovery.JOIN_TIMEOUT_SETTING.getKey(), "10s")
|
||||
.build();
|
||||
|
||||
logger.info("--> starting 4 nodes on different zones");
|
||||
|
@ -30,7 +30,6 @@ import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.discovery.zen.FaultDetection;
|
||||
import org.elasticsearch.discovery.zen.UnicastZenPing;
|
||||
import org.elasticsearch.discovery.zen.ZenPing;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
@ -132,15 +131,11 @@ public abstract class AbstractDisruptionTestCase extends ESIntegTestCase {
|
||||
}
|
||||
|
||||
static final Settings DEFAULT_SETTINGS = Settings.builder()
|
||||
.put(FaultDetection.PING_TIMEOUT_SETTING.getKey(), "1s") // for hitting simulated network failures quickly
|
||||
.put(FaultDetection.PING_RETRIES_SETTING.getKey(), "1") // for hitting simulated network failures quickly
|
||||
.put(LeaderChecker.LEADER_CHECK_TIMEOUT_SETTING.getKey(), "1s") // for hitting simulated network failures quickly
|
||||
.put(LeaderChecker.LEADER_CHECK_RETRY_COUNT_SETTING.getKey(), 1) // for hitting simulated network failures quickly
|
||||
.put(FollowersChecker.FOLLOWER_CHECK_TIMEOUT_SETTING.getKey(), "1s") // for hitting simulated network failures quickly
|
||||
.put(FollowersChecker.FOLLOWER_CHECK_RETRY_COUNT_SETTING.getKey(), 1) // for hitting simulated network failures quickly
|
||||
.put("discovery.zen.join_timeout", "10s") // still long to induce failures but to long so test won't time out
|
||||
.put(JoinHelper.JOIN_TIMEOUT_SETTING.getKey(), "10s") // still long to induce failures but to long so test won't time out
|
||||
.put(DiscoverySettings.PUBLISH_TIMEOUT_SETTING.getKey(), "1s") // <-- for hitting simulated network failures quickly
|
||||
.put(Coordinator.PUBLISH_TIMEOUT_SETTING.getKey(), "1s") // <-- for hitting simulated network failures quickly
|
||||
.put(TransportSettings.CONNECT_TIMEOUT.getKey(), "10s") // Network delay disruption waits for the min between this
|
||||
// value and the time of disruption and does not recover immediately
|
||||
|
@ -388,13 +388,9 @@ public class ClusterDisruptionIT extends AbstractDisruptionTestCase {
|
||||
* Test for https://github.com/elastic/elasticsearch/issues/11665
|
||||
*/
|
||||
public void testIndicesDeleted() throws Exception {
|
||||
final Settings settings = Settings.builder()
|
||||
.put(DiscoverySettings.PUBLISH_TIMEOUT_SETTING.getKey(), "0s") // don't wait on isolated data node
|
||||
.put(DiscoverySettings.COMMIT_TIMEOUT_SETTING.getKey(), "30s") // wait till cluster state is committed
|
||||
.build();
|
||||
final String idxName = "test";
|
||||
final List<String> allMasterEligibleNodes = internalCluster().startMasterOnlyNodes(2, settings);
|
||||
final String dataNode = internalCluster().startDataOnlyNode(settings);
|
||||
final List<String> allMasterEligibleNodes = internalCluster().startMasterOnlyNodes(2);
|
||||
final String dataNode = internalCluster().startDataOnlyNode();
|
||||
ensureStableCluster(3);
|
||||
assertAcked(prepareCreate("test"));
|
||||
|
||||
|
@ -71,7 +71,6 @@ public class SnapshotDisruptionIT extends ESIntegTestCase {
|
||||
return Settings.builder().put(super.nodeSettings(nodeOrdinal))
|
||||
.put(AbstractDisruptionTestCase.DEFAULT_SETTINGS)
|
||||
.put(TestZenDiscovery.USE_MOCK_PINGS.getKey(), false)
|
||||
.put(DiscoverySettings.COMMIT_TIMEOUT_SETTING.getKey(), "30s")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -223,6 +223,12 @@ public class ZenFaultDetectionTests extends ESTestCase {
|
||||
}
|
||||
|
||||
assertThat(failureReason[0], matcher);
|
||||
|
||||
assertWarnings(
|
||||
"[discovery.zen.fd.connect_on_network_disconnect] setting was deprecated in Elasticsearch and will be removed in a future " +
|
||||
"release! See the breaking changes documentation for the next major version.",
|
||||
"[discovery.zen.fd.ping_interval] setting was deprecated in Elasticsearch and will be removed in a future " +
|
||||
"release! See the breaking changes documentation for the next major version.");
|
||||
}
|
||||
|
||||
public void testMasterFaultDetectionConnectOnDisconnect() throws InterruptedException {
|
||||
@ -262,6 +268,12 @@ public class ZenFaultDetectionTests extends ESTestCase {
|
||||
}
|
||||
|
||||
assertThat(failureReason[0], matcher);
|
||||
|
||||
assertWarnings(
|
||||
"[discovery.zen.fd.connect_on_network_disconnect] setting was deprecated in Elasticsearch and will be removed in a future " +
|
||||
"release! See the breaking changes documentation for the next major version.",
|
||||
"[discovery.zen.fd.ping_interval] setting was deprecated in Elasticsearch and will be removed in a future " +
|
||||
"release! See the breaking changes documentation for the next major version.");
|
||||
}
|
||||
|
||||
public void testMasterFaultDetectionNotSizeLimited() throws InterruptedException {
|
||||
@ -301,6 +313,12 @@ public class ZenFaultDetectionTests extends ESTestCase {
|
||||
assertThat(inFlightRequestsBreaker.getTrippedCount(), equalTo(0L));
|
||||
assertThat(pingProbeA.completedPings(), greaterThanOrEqualTo(minExpectedPings));
|
||||
assertThat(pingProbeB.completedPings(), greaterThanOrEqualTo(minExpectedPings));
|
||||
|
||||
assertWarnings(
|
||||
"[discovery.zen.fd.connect_on_network_disconnect] setting was deprecated in Elasticsearch and will be removed in a future " +
|
||||
"release! See the breaking changes documentation for the next major version.",
|
||||
"[discovery.zen.fd.ping_interval] setting was deprecated in Elasticsearch and will be removed in a future " +
|
||||
"release! See the breaking changes documentation for the next major version.");
|
||||
}
|
||||
|
||||
private static class PingProbe extends MockTransportService.Tracer {
|
||||
|
@ -413,6 +413,10 @@ public class PublishClusterStateActionTests extends ESTestCase {
|
||||
clusterState = ClusterState.builder(clusterState).blocks(ClusterBlocks.builder()
|
||||
.addGlobalBlock(MetaData.CLUSTER_READ_ONLY_BLOCK)).incrementVersion().build();
|
||||
publishStateAndWait(nodeA.action, clusterState, previousClusterState);
|
||||
|
||||
assertWarnings(
|
||||
"[discovery.zen.publish_diff.enable] setting was deprecated in Elasticsearch and will be removed in a future release! " +
|
||||
"See the breaking changes documentation for the next major version.");
|
||||
}
|
||||
|
||||
|
||||
@ -464,6 +468,10 @@ public class PublishClusterStateActionTests extends ESTestCase {
|
||||
assertSameState(node.clusterState, clusterState);
|
||||
assertThat(node.clusterState.nodes().getLocalNode(), equalTo(node.discoveryNode));
|
||||
}
|
||||
|
||||
assertWarnings(
|
||||
"[discovery.zen.publish_diff.enable] setting was deprecated in Elasticsearch and will be removed in a future release! " +
|
||||
"See the breaking changes documentation for the next major version.");
|
||||
}
|
||||
|
||||
public void testSerializationFailureDuringDiffPublishing() throws Exception {
|
||||
@ -625,6 +633,12 @@ public class PublishClusterStateActionTests extends ESTestCase {
|
||||
}
|
||||
assertThat(exception.getMessage(), containsString(timeOutNodes > 0 ? "timed out" : "failed"));
|
||||
}
|
||||
|
||||
assertWarnings(
|
||||
"[discovery.zen.publish_timeout] setting was deprecated in Elasticsearch and will be removed in a future release! " +
|
||||
"See the breaking changes documentation for the next major version.",
|
||||
"[discovery.zen.commit_timeout] setting was deprecated in Elasticsearch and will be removed in a future release! " +
|
||||
"See the breaking changes documentation for the next major version.");
|
||||
}
|
||||
|
||||
public void testOutOfOrderCommitMessages() throws Throwable {
|
||||
@ -707,6 +721,10 @@ public class PublishClusterStateActionTests extends ESTestCase {
|
||||
assertThat(node.clusterState.stateUUID(), not(equalTo(state.stateUUID())));
|
||||
}
|
||||
}
|
||||
|
||||
assertWarnings(
|
||||
"[discovery.zen.commit_timeout] setting was deprecated in Elasticsearch and will be removed in a future release! " +
|
||||
"See the breaking changes documentation for the next major version.");
|
||||
}
|
||||
|
||||
private void assertPublishClusterStateStats(String description, MockNode node, long expectedFull, long expectedIncompatibleDiffs,
|
||||
|
@ -30,7 +30,6 @@ import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.collect.MapBuilder;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.discovery.zen.ZenDiscovery;
|
||||
import org.elasticsearch.indices.recovery.RecoveryState;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
@ -55,8 +54,7 @@ public class FullRollingRestartIT extends ESIntegTestCase {
|
||||
}
|
||||
|
||||
public void testFullRollingRestart() throws Exception {
|
||||
Settings settings = Settings.builder().put(ZenDiscovery.JOIN_TIMEOUT_SETTING.getKey(), "30s").build();
|
||||
internalCluster().startNode(settings);
|
||||
internalCluster().startNode();
|
||||
createIndex("test");
|
||||
|
||||
final String healthTimeout = "1m";
|
||||
@ -72,16 +70,16 @@ public class FullRollingRestartIT extends ESIntegTestCase {
|
||||
}
|
||||
|
||||
logger.info("--> now start adding nodes");
|
||||
internalCluster().startNode(settings);
|
||||
internalCluster().startNode(settings);
|
||||
internalCluster().startNode();
|
||||
internalCluster().startNode();
|
||||
|
||||
// make sure the cluster state is green, and all has been recovered
|
||||
assertTimeout(client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setTimeout(healthTimeout)
|
||||
.setWaitForGreenStatus().setWaitForNoRelocatingShards(true).setWaitForNodes("3"));
|
||||
|
||||
logger.info("--> add two more nodes");
|
||||
internalCluster().startNode(settings);
|
||||
internalCluster().startNode(settings);
|
||||
internalCluster().startNode();
|
||||
internalCluster().startNode();
|
||||
|
||||
// make sure the cluster state is green, and all has been recovered
|
||||
assertTimeout(client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setTimeout(healthTimeout)
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Licensed to Elasticsearch under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
@ -30,7 +29,6 @@ import org.elasticsearch.core.internal.io.IOUtils;
|
||||
import org.elasticsearch.discovery.DiscoveryModule;
|
||||
import org.elasticsearch.discovery.DiscoverySettings;
|
||||
import org.elasticsearch.discovery.zen.SettingsBasedHostsProvider;
|
||||
import org.elasticsearch.discovery.zen.ZenDiscovery;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
@ -339,9 +337,6 @@ public class InternalTestClusterTests extends ESTestCase {
|
||||
.put(NodeEnvironment.MAX_LOCAL_STORAGE_NODES_SETTING.getKey(), numNodes)
|
||||
.put(NetworkModule.TRANSPORT_TYPE_KEY, getTestTransportType())
|
||||
.put(DiscoverySettings.INITIAL_STATE_TIMEOUT_SETTING.getKey(), 0)
|
||||
// speedup join timeout as setting initial state timeout to 0 makes split
|
||||
// elections more likely
|
||||
.put(ZenDiscovery.JOIN_TIMEOUT_SETTING.getKey(), "3s")
|
||||
.putList(DISCOVERY_HOSTS_PROVIDER_SETTING.getKey(), "file")
|
||||
.putList(SettingsBasedHostsProvider.DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING.getKey())
|
||||
.build();
|
||||
|
@ -11,8 +11,6 @@ import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeUnit;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.discovery.DiscoverySettings;
|
||||
import org.elasticsearch.discovery.zen.FaultDetection;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.discovery.TestZenDiscovery;
|
||||
@ -39,10 +37,6 @@ public class NetworkDisruptionIT extends BaseMlIntegTestCase {
|
||||
protected Settings nodeSettings(int nodeOrdinal) {
|
||||
return Settings.builder().put(super.nodeSettings(nodeOrdinal))
|
||||
.put(TestZenDiscovery.USE_MOCK_PINGS.getKey(), false)
|
||||
.put(FaultDetection.PING_TIMEOUT_SETTING.getKey(), "1s") // for hitting simulated network failures quickly
|
||||
.put(FaultDetection.PING_RETRIES_SETTING.getKey(), "1") // for hitting simulated network failures quickly
|
||||
.put(DiscoverySettings.PUBLISH_TIMEOUT_SETTING.getKey(), "1s") // for hitting simulated network failures quickly
|
||||
.put("discovery.zen.join_timeout", "10s") // still long to induce failures but not too long so test won't time out
|
||||
.build();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user