-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Only connect to formed remote clusters #31424
Conversation
This change prevent remote cluster connections to be established to nodes that have not yet joined a cluster and don't have a cluster UUID. This allows to effectivly detect nodes that are part of the local cluster. To compare the local cluster UUID to the remote nodes cluster UUID we need to wait until we recovered a state and a master is elected before we can connect to remote clusters. Relates to elastic#31331
Pinging @elastic/es-core-infra |
@tbrooks @javanna I am not convinced this it the right thing to do. Given that we need to expand the remote connection profile down the road for CCR and then likely use |
I am onboard with using the default connection profile. We could also allow the |
Hypothetically - it would look something like above. We have the per-node connection lock so this would be safe from a threading standpoint. The trickiest part would probably be what behavior we want from all of the
Anyway, I'm just throwing this out as an idea. I am fine with the default connection profile approach. |
@tbrooks8 when I first read it I was a fan but it seems like we are just making things more complicated that way. For instance I there are 2 parts of the code that connect to a node and one of them disconnects from it, should it still be reachable to the other? I think down the road we should maintain a dedicated connection. Like we should maybe modify the discovery node's ephemera ID such that it's a private connection. I am not sure what the best way is but I think we should work on more isolation on that layer such a that I can only get a connection to a remote cluster if I go through the RemoteClusterConnection |
closing in favor of #31835 |
This change prevent remote cluster connections to be established
to nodes that have not yet joined a cluster and don't have a cluster
UUID. This allows to effectivly detect nodes that are part of the local
cluster. To compare the local cluster UUID to the remote nodes cluster UUID
we need to wait until we recovered a state and a master is elected before
we can connect to remote clusters.
Relates to #31331