-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Reject port ranges in discovery.seed_hosts
#41404
Conversation
Pinging @elastic/es-distributed |
@elasticmachine test this please |
Got an error |
@Hohol You can use |
@DaveCTurner can you review it please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't force-push to PR branches. It loses the history of the changes, including any comments, and generally makes it harder to review.
I think the fix can be made much more deeply. TcpTransport#parse()
has a perAddressLimit
that is always 1
except when discovery.seed_hosts
is unset, and as far as I can tell this method is only used to read the discovery.seed_hosts
setting. I think we could reasonably ditch this parameter and, instead, compute the local addresses in SettingsBasedSeedHostsProvider
.
I noticed an inconsistency with documentation.
It sounds to me like ports But actually Should I do something with it? |
Good catch, yes. Let's treat the docs as the desired behaviour and consider it as a bug that we don't scan port 9305. |
PR was updated. |
It's still better to avoid a force-push, even if you start again, because now the conversation above doesn't make much sense. @elasticmachine ok to test. |
|
Yes, that looks weird and totally unrelated. @elasticmachine please run elasticsearch/ci-1 |
Looks like build hasn't started. |
@elasticmachine please run elasticsearch/ci-1 @Hohol no, I think @elasticmachine only pays attention to members of the Elastic organisation. |
Bah, it's not running the build because I'm spelling it wrong. @elasticmachine please run elasticsearch-ci/1 😁 |
@DaveCTurner please review it. |
server/src/main/java/org/elasticsearch/transport/Transport.java
Outdated
Show resolved
Hide resolved
Builds failed with some weird errors again. |
@DaveCTurner sorry for bothering you again, but I'd like to finish it sooner. Could you please rerun tests and review? |
@DaveCTurner done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. I went through the whole PR including the tests and left a few more small suggestions.
server/src/main/java/org/elasticsearch/transport/TcpTransport.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/transport/TcpTransportTests.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/transport/TcpTransport.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@DaveCTurner are we waiting for something else? |
Hi @Hohol, as I've indicated, this PR looks good to me. I will merge and backport it when I have the availability, but the backport will take time since it requires documentation changes and I am not available to do it now. It is by no means urgent. Please be more patient in future. |
I really wanted to know what's going on. Thanks for reply. I'll try to be less annoying next time. |
Today Elasticsearch accepts, but silently ignores, port ranges in the `discovery.seed_hosts` setting: ``` discovery.seed_hosts: 10.1.2.3:9300-9400 ``` Silently ignoring part of a setting like this is trappy. With this change we reject seed host addresses of this form. Closes elastic#40786 Backport of elastic#41404
* elastic/master: (50 commits) Cleanup versioned deprecations in analysis (elastic#41560) Allow unknown task time in QueueResizingEsTPE (elastic#41810) SQL: Remove CircuitBreaker from parser (elastic#41835) [DOCS] Fix callouts for dataframe APIs (elastic#41904) Handle serialization exceptions during publication (elastic#41781) Correct spelling of MockLogAppender.PatternSeenEventExpectation (elastic#41893) Update TLS ciphers and protocols for JDK 11 (elastic#41808) Remove Harmful Exists Check from BlobStoreFormat (elastic#41898) Fix fractional seconds for strict_date_optional_time (elastic#41871) Remove op.name configuration setting (elastic#41445) Reject port ranges in `discovery.seed_hosts` (elastic#41404) [ML-DataFrame] migrate to PageParams for get and stats, move PageParams into core (elastic#41851) Reenable RareClusterStateIT Mapping Propagation Tests (elastic#41884) [DOCS] Rewrite `exists` query docs (elastic#41868) Revert "Mute MinimumMasterNodesIT.testThreeNodesNoMasterBlock()" [DOCS] Fix typo referring to multi search API Provide names for all artifact repositories (elastic#41857) Move InternalAggregations to Writeable (elastic#41841) Fix compilation after incorrect merge Unmute TestClustersPluginIT.testMultiNode (elastic#41340) ...
Today Elasticsearch accepts, but silently ignores, port ranges in the `discovery.seed_hosts` setting: ``` discovery.seed_hosts: 10.1.2.3:9300-9400 ``` Silently ignoring part of a setting like this is trappy. With this change we reject seed host addresses of this form. Closes #40786 Backport of #41404
This change makes the default seed address tests account for the lack of an IPv6 network. By default docker containers only run with IPv4 and these tests fail in a vanilla installation of elasticsearch-ci. To resolve this we only expect IPv6 seed addresses if IPv6 is available. Relates elastic#41404
This change makes the default seed address tests account for the lack of an IPv6 network. By default docker containers only run with IPv4 and these tests fail in a vanilla installation of elasticsearch-ci. To resolve this we only expect IPv6 seed addresses if IPv6 is available. Relates #41404
This change makes the default seed address tests account for the lack of an IPv6 network. By default docker containers only run with IPv4 and these tests fail in a vanilla installation of elasticsearch-ci. To resolve this we only expect IPv6 seed addresses if IPv6 is available. Relates #41404
Today Elasticsearch accepts, but silently ignores, port ranges in the `discovery.seed_hosts` setting: ``` discovery.seed_hosts: 10.1.2.3:9300-9400 ``` Silently ignoring part of a setting like this is trappy. With this change we reject seed host addresses of this form. Closes elastic#40786
This change makes the default seed address tests account for the lack of an IPv6 network. By default docker containers only run with IPv4 and these tests fail in a vanilla installation of elasticsearch-ci. To resolve this we only expect IPv6 seed addresses if IPv6 is available. Relates elastic#41404
Today Elasticsearch accepts, but silently ignores, port ranges in the
discovery.seed_hosts
setting:Silently ignoring part of a setting like this is trappy. With this change we
reject seed host addresses of this form.
Closes #40786