Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Zen1 #39466

Merged
merged 32 commits into from
Mar 4, 2019
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
93fa50c
Move stats out of Zen1 package
ywelsch Feb 27, 2019
51ca5b0
move ValidateJoinRequest
ywelsch Feb 27, 2019
6421168
move hosts resolving to SeedHostsResolver
ywelsch Feb 27, 2019
b4f3063
switch serializeFullClusterState
ywelsch Feb 27, 2019
f8a946e
not mention zen disco in ClusterState
ywelsch Feb 27, 2019
193340e
remove mention of MasterFaultDetection
ywelsch Feb 27, 2019
764b4d5
Add SeedHostsResolverTests
ywelsch Feb 27, 2019
6196455
move join validator test to zen2
ywelsch Feb 27, 2019
4f8b70e
remove Zen1 dep from GatewayIndexStateIT
ywelsch Feb 27, 2019
e4e9c09
remove zen1 dependency from server/src/test/java/org/elasticsearch/c…
ywelsch Feb 27, 2019
756dc42
move MembershipActionTests.java
ywelsch Feb 27, 2019
5e4a0e7
remove zen discovery
ywelsch Feb 27, 2019
b0e5170
checkstyle for SeedHostsResolver
ywelsch Feb 27, 2019
cda20f5
remove zen1 from build
ywelsch Feb 27, 2019
f4967bd
Add migration docs for 8.0
ywelsch Feb 27, 2019
22438b7
remove more legacy settings
ywelsch Feb 27, 2019
6a4e69d
remove DiscoverySettings
ywelsch Feb 27, 2019
e5abf4a
add extra settings
ywelsch Feb 27, 2019
e16720f
oops delete frenzy
ywelsch Feb 27, 2019
b1eb7cc
Merge remote-tracking branch 'elastic/master' into remove-zen1
ywelsch Feb 27, 2019
f7cd1b8
too much delete
ywelsch Feb 27, 2019
799c335
remove more mentions of zen
ywelsch Mar 1, 2019
ed74cd2
remove minimumMasterNodesOnPublishingMaster
ywelsch Mar 1, 2019
0bf8a12
refactor static method in SeedHostsResolver
ywelsch Mar 1, 2019
d61827d
more Zen1 removal
ywelsch Mar 1, 2019
c99dce0
remove ZEN1_BWC_TERM
ywelsch Mar 4, 2019
2edd8b4
remove legacy-zen discovery type
ywelsch Mar 4, 2019
d3201dd
remove from transport.tracer.exclude
ywelsch Mar 4, 2019
7add5f4
update docs for transport.tracer.exclude
ywelsch Mar 4, 2019
9d5d034
do not mention Zen discovery in Wireshark section
ywelsch Mar 4, 2019
2bde97c
no zen in startup logs
ywelsch Mar 4, 2019
97829a4
Merge remote-tracking branch 'elastic/master' into remove-zen1
ywelsch Mar 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,6 @@ class ClusterConfiguration {
@Input
boolean debug = false

/**
* Configuration of the setting {@code discovery.zen.minimum_master_nodes} on the nodes.
* In case of more than one node, this defaults to the number of nodes
*/
@Input
Closure<Integer> minimumMasterNodes = {
if (bwcVersion != null && bwcVersion.before("6.5.0")) {
return numNodes > 1 ? numNodes : -1
} else {
return numNodes > 1 ? numNodes.intdiv(2) + 1 : -1
}
}

/**
* Whether the initial_master_nodes setting should be automatically derived from the nodes
* in the cluster. Only takes effect if all nodes in the cluster understand this setting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,42 +127,25 @@ class ClusterFormationTasks {
nodes.add(node)
Closure<Map> writeConfigSetup
Object dependsOn
if (node.nodeVersion.onOrAfter("6.5.0")) {
writeConfigSetup = { Map esConfig ->
if (config.getAutoSetHostsProvider()) {
// Don't force discovery provider if one is set by the test cluster specs already
final String seedProvidersSettingName =
node.nodeVersion.onOrAfter("7.0.0") ? "discovery.seed_providers" : "discovery.zen.hosts_provider";
if (esConfig.containsKey(seedProvidersSettingName) == false) {
esConfig[seedProvidersSettingName] = 'file'
}
esConfig[node.nodeVersion.onOrAfter("7.0.0") ? "discovery.seed_hosts" : "discovery.zen.ping.unicast.hosts"] = []
}
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 ->
if (n.config.settings['node.name'] == null) {
return "node-" + n.nodeNum
} else {
return n.config.settings['node.name']
}
}).collect(Collectors.toList())
writeConfigSetup = { Map esConfig ->
if (config.getAutoSetHostsProvider()) {
if (esConfig.containsKey("discovery.seed_providers") == false) {
esConfig["discovery.seed_providers"] = 'file'
}
esConfig
esConfig["discovery.seed_hosts"] = []
}
dependsOn = startDependencies
} else {
dependsOn = startTasks.empty ? startDependencies : startTasks.get(0)
writeConfigSetup = { Map esConfig ->
String unicastTransportUri = node.config.unicastTransportUri(nodes.get(0), node, project.createAntBuilder())
if (unicastTransportUri == null) {
esConfig['discovery.zen.ping.unicast.hosts'] = []
} else {
esConfig['discovery.zen.ping.unicast.hosts'] = "\"${unicastTransportUri}\""
}
esConfig
if (esConfig['discovery.type'] == null && config.getAutoSetInitialMasterNodes()) {
esConfig['cluster.initial_master_nodes'] = nodes.stream().map({ n ->
if (n.config.settings['node.name'] == null) {
return "node-" + n.nodeNum
} else {
return n.config.settings['node.name']
}
}).collect(Collectors.toList())
}
esConfig
}
dependsOn = startDependencies
startTasks.add(configureNode(project, prefix, runner, dependsOn, node, config, distro, writeConfigSetup))
}

Expand Down Expand Up @@ -380,17 +363,6 @@ class ClusterFormationTasks {
// Don't wait for state, just start up quickly. This will also allow new and old nodes in the BWC case to become the master
'discovery.initial_state_timeout' : '0s'
]
int minimumMasterNodes = node.config.minimumMasterNodes.call()
if (node.nodeVersion.before("7.0.0") && minimumMasterNodes > 0) {
esConfig['discovery.zen.minimum_master_nodes'] = minimumMasterNodes
}
if (node.nodeVersion.before("7.0.0") && esConfig.containsKey('discovery.zen.master_election.wait_for_joins_timeout') == false) {
// If a node decides to become master based on partial information from the pinging, don't let it hang for 30 seconds to correct
// its mistake. Instead, only wait 5s to do another round of pinging.
// This is necessary since we use 30s as the default timeout in REST requests waiting for cluster formation
// so we need to bail quicker than the default 30s for the cluster to form in time.
esConfig['discovery.zen.master_election.wait_for_joins_timeout'] = '5s'
}
esConfig['node.max_local_storage_nodes'] = node.config.numNodes
esConfig['http.port'] = node.config.httpPort
esConfig['transport.tcp.port'] = node.config.transportPort
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/migration/migrate_8_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ See also <<release-highlights>> and <<es-release-notes>>.
coming[8.0.0]

* <<breaking_80_analysis_changes>>
* <<breaking_80_discovery_changes>>
* <<breaking_80_mappings_changes>>

[float]
Expand All @@ -31,4 +32,5 @@ Elasticsearch 7.x in order to be readable by Elasticsearch 8.x.
=========================================

include::migrate_8_0/analysis.asciidoc[]
include::migrate_8_0/discovery.asciidoc[]
include::migrate_8_0/mappings.asciidoc[]
32 changes: 32 additions & 0 deletions docs/reference/migration/migrate_8_0/discovery.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[float]
[[breaking_80_discovery_changes]]
=== Discovery changes

[float]
==== Removal of old discovery settings

All settings under the `discovery.zen` namespace, which existed only for BWC reasons in 7.x,
will no longer be supported. In particular, this includes:

- `discovery.zen.no_master_block`
- `discovery.zen.hosts_provider`
- `discovery.zen.publish_timeout`
- `discovery.zen.commit_timeout`
- `discovery.zen.publish_diff.enable`
- `discovery.zen.ping.unicast.concurrent_connects`
- `discovery.zen.ping.unicast.hosts.resolve_timeout`
- `discovery.zen.ping.unicast.hosts`
- `discovery.zen.unsafe_rolling_upgrades_enabled`
- `discovery.zen.commit_timeout`
- `discovery.zen.fd.connect_on_network_disconnect`
- `discovery.zen.fd.ping_interval`
- `discovery.zen.fd.ping_timeout`
- `discovery.zen.fd.ping_retries`
- `discovery.zen.fd.register_connection_listener`
- `discovery.zen.join_retry_attempts`
- `discovery.zen.join_retry_delay`
- `discovery.zen.max_pings_from_another_master`
- `discovery.zen.send_leave_request`
- `discovery.zen.master_election.wait_for_joins_timeout`
- `discovery.zen.master_election.ignore_non_master_pings`
- `discovery.zen.publish.max_pending_cluster_states`
27 changes: 4 additions & 23 deletions docs/reference/modules/discovery/discovery-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,14 @@ Discovery and cluster formation are affected by the following settings:
Provides a list of master-eligible nodes in the cluster. Each value has the
format `host:port` or `host`, where `port` defaults to the setting
`transport.profiles.default.port`. Note that IPv6 hosts must be bracketed.
The default value is `["127.0.0.1", "[::1]"]`. See <<unicast.hosts>>. This
setting was previously known as `discovery.zen.ping.unicast.hosts`. Its old
name is deprecated but continues to work in order to preserve backwards
compatibility. Support for the old name will be removed in a future
version.
The default value is `["127.0.0.1", "[::1]"]`. See <<unicast.hosts>>.

`discovery.seed_providers`::

Specifies which types of <<built-in-hosts-providers,seed hosts provider>>
to use to obtain the addresses of the seed nodes used to start the
discovery process. By default, it is the
<<settings-based-hosts-provider,settings-based seed hosts provider>>. This
setting was previously known as `discovery.zen.hosts_provider`. Its old
name is deprecated but continues to work in order to preserve backwards
compatibility. Support for the old name will be removed in a future
version.
<<settings-based-hosts-provider,settings-based seed hosts provider>>.

`discovery.cluster_formation_warning_timeout`::

Expand Down Expand Up @@ -55,20 +47,12 @@ Discovery and cluster formation are affected by the following settings:
`discovery.seed_resolver.max_concurrent_resolvers`::

Specifies how many concurrent DNS lookups to perform when resolving the
addresses of seed nodes. Defaults to `10`. This setting was previously
known as `discovery.zen.ping.unicast.concurrent_connects`. Its old name is
deprecated but continues to work in order to preserve backwards
compatibility. Support for the old name will be removed in a future
version.
addresses of seed nodes. Defaults to `10`.

`discovery.seed_resolver.timeout`::

Specifies how long to wait for each DNS lookup performed when resolving the
addresses of seed nodes. Defaults to `5s`. This setting was previously
known as `discovery.zen.ping.unicast.hosts.resolve_timeout`. Its old name
is deprecated but continues to work in order to preserve backwards
compatibility. Support for the old name will be removed in a future
version.
addresses of seed nodes. Defaults to `5s`.

`cluster.auto_shrink_voting_configuration`::

Expand Down Expand Up @@ -192,7 +176,4 @@ APIs are not be blocked and can run on any available node.
* For the cluster to be fully operational, it must have an active master.
===============================

WARNING: This setting replaces the `discovery.zen.no_master_block` setting in
earlier versions. The `discovery.zen.no_master_block` setting is ignored.

--
1 change: 0 additions & 1 deletion qa/logging-config/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ apply plugin: 'elasticsearch.rest-test'
apply plugin: 'elasticsearch.standalone-test'

integTestCluster {
autoSetInitialMasterNodes = false
autoSetHostsProvider = false
/**
* Provide a custom log4j configuration where layout is an old style pattern and confirm that Elasticsearch
Expand Down
1 change: 0 additions & 1 deletion qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ for (Version version : bwcVersions.wireCompatible) {
dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop"
clusterName = 'rolling-upgrade'
otherUnicastHostAddresses = { getOtherUnicastHostAddresses() }
autoSetInitialMasterNodes = false
/* Override the data directory so the new node always gets the node we
* just stopped's data directory. */
dataDir = { nodeNumber -> oldClusterTest.nodes[stopNode].dataDir }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.ClusterStateObserver;
import org.elasticsearch.cluster.block.ClusterBlockException;
import org.elasticsearch.cluster.coordination.PublicationTransportHandler;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.MetaData;
Expand All @@ -42,8 +43,6 @@
import java.io.IOException;
import java.util.function.Predicate;

import static org.elasticsearch.discovery.zen.PublishClusterStateAction.serializeFullClusterState;

public class TransportClusterStateAction extends TransportMasterNodeReadAction<ClusterStateRequest, ClusterStateResponse> {


Expand Down Expand Up @@ -127,7 +126,6 @@ private void buildResponse(final ClusterStateRequest request,
ClusterState.Builder builder = ClusterState.builder(currentState.getClusterName());
builder.version(currentState.version());
builder.stateUUID(currentState.stateUUID());
builder.minimumMasterNodesOnPublishingMaster(currentState.getMinimumMasterNodesOnPublishingMaster());

if (request.nodes()) {
builder.nodes(currentState.nodes());
Expand Down Expand Up @@ -185,7 +183,7 @@ private void buildResponse(final ClusterStateRequest request,
}
}
listener.onResponse(new ClusterStateResponse(currentState.getClusterName(), builder.build(),
serializeFullClusterState(currentState, Version.CURRENT).length(), false));
PublicationTransportHandler.serializeFullClusterState(currentState, Version.CURRENT).length(), false));
}


Expand Down
Loading