Skip to content

Commit e2ef488

Browse files
committed
Reinstate unicast_hosts.txt
1 parent b581cb7 commit e2ef488

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

docs/plugins/discovery-file.asciidoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
=== File-Based Discovery Plugin
33

44
The functionality provided by the `discovery-file` plugin is now available in
5-
Elasticsearch without requiring a plugin. This plugin still exists for backwards
6-
compatibility, but it no longer does anything and will be removed in a future
7-
version.
5+
Elasticsearch without requiring a plugin. This plugin still exists to ensure
6+
backwards compatibility, but it will be removed in a future version.
7+
8+
On installation, this plugin creates a file at
9+
`$ES_PATH_CONF/discovery-file/unicast_hosts.txt` that comprises comments that
10+
describe how to use it. It is preferable not to install this plugin and instead
11+
to create this file, and its containing directory, using standard tools.
812

913
:plugin_name: discovery-file
1014
include::install_remove.asciidoc[]

plugins/discovery-file/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ esplugin {
2626
classname 'org.elasticsearch.discovery.file.FileBasedDiscoveryPlugin'
2727
}
2828

29+
bundlePlugin {
30+
from('config/discovery-file') {
31+
into 'config'
32+
}
33+
}
34+
2935
task setupSeedNodeAndUnicastHostsFile(type: DefaultTask) {
3036
mustRunAfter(precommit)
3137
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# The unicast_hosts.txt file contains the list of unicast hosts to connect to
2+
# for pinging during the discovery process, when using the file-based discovery
3+
# mechanism. This file should contain one entry per line, where an entry is a
4+
# host/port combination. The host and port should be separated by a `:`. If
5+
# the port is left off, a default port of 9300 is assumed. For example, if the
6+
# cluster has three nodes that participate in the discovery process:
7+
# (1) 66.77.88.99 running on port 9300 (2) 66.77.88.100 running on port 9305
8+
# and (3) 66.77.88.99 running on port 10005, then this file should contain the
9+
# following text:
10+
#
11+
#10.10.10.5
12+
#10.10.10.6:9305
13+
#10.10.10.5:10005
14+
#
15+
# For IPv6 addresses, make sure to put a bracket around the host part of the address,
16+
# for example: [2001:cdba:0000:0000:0000:0000:3257:9652]:9301 (where 9301 is the port).
17+
#
18+
# NOTE: all lines starting with a `#` are comments, and comments must exist
19+
# on lines of their own (i.e. comments cannot begin in the middle of a line)
20+
#

0 commit comments

Comments
 (0)