-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Enforce discovery.zen.minimum_master_nodes
is set when bound to a public ip
#17288
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
Conversation
* @return true if the node failed the check | ||
*/ | ||
boolean check(); | ||
boolean check(Settings settings); |
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.
I don't like that settings need to be passed into every check method. I'd prefer the specific setting needed be passed into MinMasterNodesCheck
when it's constructed (look at the MlockallCheck
).
There's a comment at the top of |
@@ -93,12 +93,12 @@ static void check(final boolean enforceLimits, final List<Check> checks) { | |||
// visible for testing | |||
static Set<Setting> enforceSettings() { | |||
return Collections.unmodifiableSet(new HashSet<>(Arrays.asList( | |||
TransportSettings.BIND_HOST, |
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.
More unrelated formatting changes? Disable auto-format on commit?
@bleskes Thank you for picking this one up. I left a few more comments about the unrelated formatting changes and the test; feel free to process and push at your discretion. It would be nice to someday make the check much stronger than whether or not the setting is set at all (i.e., enforce that it's a quorum). I think that we should think about this over the next few months as we work on related problems in this area. |
…ublic ip elastic#17288 discovery.zen.minimum_master_nodes is the single most important setting to set on a production cluster. We have no way of supplying a good default so it must be set by the user. Binding a node to a public IP (as opposed to the default local host) is a good enough indication that a node will be part of a production cluster cluster and thus it's a good tradeoff to enforce the settings. Note that nothing prevent users from setting it to 1 in a single node cluster. Closes elastic#17288
f9900d7
to
b8227a7
Compare
discovery.zen.minimum_master_nodes is the single most important setting to set on a production cluster. We have no way of supplying a good default so it must be set by the user. Binding a node to a public IP (as opposed to the default local host) is a good enough indication that a node will be part of a production cluster cluster and thus it's a good tradeoff to enforce the settings. Note that nothing prevent users from setting it to 1 in a single node cluster.