Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions plugins/discovery-file/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ setupSeedNodeAndUnicastHostsFile.doLast {
integTestCluster {
dependsOn setupSeedNodeAndUnicastHostsFile
clusterName = 'discovery-file-test-cluster'
setting 'discovery.zen.hosts_provider', 'file'
extraConfigFile 'discovery-file/unicast_hosts.txt', srcUnicastHostsFile
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,4 @@ public Map<String, Supplier<UnicastHostsProvider>> getZenHostsProviders(Transpor
() -> new FileBasedUnicastHostsProvider(
new Environment(settings, configPath), transportService, fileBasedDiscoveryExecutorService));
}

@Override
public Settings additionalSettings() {
// For 5.0, the hosts provider was "zen", but this was before the discovery.zen.hosts_provider
// setting existed. This check looks for the legacy zen, and sets the file hosts provider if not set
String discoveryType = DiscoveryModule.DISCOVERY_TYPE_SETTING.get(settings);
if (discoveryType.equals("zen")) {
deprecationLogger.deprecated("Using " + DiscoveryModule.DISCOVERY_TYPE_SETTING.getKey() +
" setting to set hosts provider is deprecated. " +
"Set \"" + DiscoveryModule.DISCOVERY_HOSTS_PROVIDER_SETTING.getKey() + ": file\" instead");
if (DiscoveryModule.DISCOVERY_HOSTS_PROVIDER_SETTING.exists(settings) == false) {
return Settings.builder().put(DiscoveryModule.DISCOVERY_HOSTS_PROVIDER_SETTING.getKey(), "file").build();
}
}
return Settings.EMPTY;
}
}

This file was deleted.