-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Omit master-ineligible nodes from initial_master_nodes #93131
Omit master-ineligible nodes from initial_master_nodes #93131
Conversation
Today the `test-clusters` framework sets `cluster.initial_master_nodes` to the names of all the nodes in the cluster, but this only makes sense if they're all master-eligible. This commit filters this setting down to just the master-eligible node names.
NB not sure this is the best way to identify the master-eligible nodes. |
Pinging @elastic/es-delivery (Team:Delivery) |
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.
This probably won't work as-is. DefaultSetrtingsProvider
is exactly that, a "default". It won't see settings added later by the user or other settings providers. So if a user configures roles on a cluster this code will actually run before that happens. We'll have to defer to setup of initial_master_nodes
until after any other settings have been configured. I can take a stab at this.
This is another item that's always historically been the case. Is this problematic now, or just non-optimal?
I stumbled across it while wanting to run a stateless cluster with a dedicated master, a dedicated indexing node and a dedicated search node so I could attach the right debuggers to the right nodes. I can live with them all being master-eligible for now. |
Will the cluster you describe fail to start as implemented today? Do all nodes have to be configured master-eligible? |
Yes.
Technically it works if >½ of them are master-eligible. |
Ok, we should definitely resolve this then. I'll take a look at the best way to pass this setting. |
Closing in favor of #93212 |
Today the
test-clusters
framework setscluster.initial_master_nodes
to the names of all the nodes in the cluster, but this only makes sense if they're all master-eligible. This commit filters this setting down to just the master-eligible node names.