forked from elastic/elasticsearch
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow binding to multiple addresses.
For consistency and simplicity this means that es.network.host/bind_host/publish_host can all take arrays. Yes, we are still limited to a single publish host, and only the "best" address from publish_host will be used, I do not change that, but its alread the case today (even by default: _local_ !), and its just an internal limitation we can later fix. Instead we just continue with the same logic of "magic selection of publish host", and users can always be explicit, and weare just clear to the user about what is happening. I did it this way, because network stuff is already overwhelmed, and i mean really overwhelmed with settings. We need to make this easy on the user to do the right thing and not make that worse. Examples: bin/elasticsearch # defaults ``` [elasticsearch] [2015-10-06 01:15:28,671][WARN ][common.network ] [Todd Arliss] publish host: [_local_] resolves to multiple addresses, auto-selecting {127.0.0.1} as single publish address [elasticsearch] [2015-10-06 01:15:28,672][INFO ][transport ] [Todd Arliss] publish_address {127.0.0.1:9300}, bound_addresses {[fe80::1]:9300}, {[::1]:9300}, {127.0.0.1:9300} ``` bin/elasticsearch -Des.network.host=_lo0_,_en0_ # multiple interfaces ``` [2015-10-06 01:17:08,970][WARN ][common.network ] [Torso] publish host: [_lo0_, _en0_] resolves to multiple addresses, auto-selecting {192.168.0.19} as single publish address [2015-10-06 01:17:08,972][INFO ][transport ] [Torso] publish_address {192.168.0.19:9300}, bound_addresses {[fe80::1]:9300}, {[::1]:9300}, {127.0.0.1:9300}, {[fe80::3e15:c2ff:fee5:d26c]:9300}, {192.168.0.19:9300} ``` bin/elasticsearch -Des.network.host=192.168.0.19,_local_ -Des.network.publish_host=192.168.0.19 # being explicit ``` [2015-10-06 01:19:28,603][INFO ][transport ] [Thunderbird] publish_address {192.168.0.19:9300}, bound_addresses {[fe80::1]:9300}, {[::1]:9300}, {127.0.0.1:9300}, {192.168.0.19:9300} ``` Closes elastic#13592
- Loading branch information
Showing
10 changed files
with
134 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.