Add the simple strategy to cluster settings#49414
Add the simple strategy to cluster settings#49414Tim-Brooks merged 12 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-distributed (:Distributed/Network) |
ywelsch
left a comment
There was a problem hiding this comment.
Can you also add a REST test that successfully / unsuccessfully switches connection mode?
Yes. I expanded the REST tests. |
|
@elasticmachine run elasticsearch-ci/2 |
ywelsch
left a comment
There was a problem hiding this comment.
I've left two comments, looking good o.w.
...ch/src/test/resources/rest-api-spec/test/multi_cluster/100_connection_mode_configuration.yml
Show resolved
Hide resolved
| - match: {transient.cluster\.remote\.test_remote_cluster\.sniff\.seeds: $remote_ip} | ||
|
|
||
| - do: | ||
| search: |
There was a problem hiding this comment.
this might fail as switching the remote connection mode does not wait for 10 seconds for the new connections to be established. I think we should adapt the waiting logic to take this into account.
There was a problem hiding this comment.
So you want me to just always wait? Setting aside the mode, any change to a remote cluster config through settings will involve the connection being torn down and rebuilt.
There was a problem hiding this comment.
I made a change in remote cluster service to always wait. The update method will complete the listener before returning if the connection is being destroyed or unchanged (meaning no wait.)
This commit back ports three commits related to enabling the simple connection strategy. Allow simple connection strategy to be configured (#49066) Currently the simple connection strategy only exists in the code. It cannot be configured. This commit moves in the direction of allowing it to be configured. It introduces settings for the addresses and socket count. Additionally it introduces new settings for the sniff strategy so that the more generic number of connections and seed node settings can be deprecated. The simple settings are not yet registered as the registration is dependent on follow-up work to validate the settings. Ensure at least 1 seed configured in remote test (#49389) This fixes #49384. Currently when we select a random subset of seed nodes from a list, it is possible for 0 seeds to be selected. This test depends on at least 1 seed being selected. Add the simple strategy to cluster settings (#49414) This is related to #49067. This commit adds the simple connection strategy settings and strategy mode setting to the cluster settings registry. With these changes, the simple connection mode can be used. Additionally, it adds validation to ensure that settings cannot be misconfigured.
This is related to #49067. This commit adds the simple connection
strategy settings and strategy mode setting to the cluster settings
registry. With these changes, the simple connection mode can be used.
Additionally, it adds validation to ensure that settings cannot be
misconfigured.