-
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
Periodic warning for 1-node cluster w/ seed hosts #88013
Periodic warning for 1-node cluster w/ seed hosts #88013
Conversation
cfec8eb
to
795a6c4
Compare
Pinging @elastic/es-distributed (Team:Distributed) |
For fully-formed single-node clusters, emit a periodic warning if seed hosts have been configured. Closes elastic#85222
795a6c4
to
2e243c4
Compare
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.
Looks good, I left some suggestions/comments but nothing major.
server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java
Outdated
Show resolved
Hide resolved
Also I've added the |
…ordinator.java Co-authored-by: David Turner <[email protected]>
Hi @DaveCTurner , I've manually checked that the warning doesn't appear on a local distribution I built. How can I manually test it on a single-node cloud cluster? Does the cloud-deploy label somehow automatically spin a cloud cluster so I can check the logs? |
Hi @DaveCTurner , also pushed suggested changes, please check once more. |
I shared a link to the internal docs in another channel. |
@elasticmachine test this |
@DaveCTurner please check once more and review. |
@elasticmachine run elasticsearch-ci/packaging-tests-unix-sample |
1 similar comment
@elasticmachine run elasticsearch-ci/packaging-tests-unix-sample |
Hi @DaveCTurner , PR is ready for your review. |
👍 sorry I'm unlikely to get to this today now, but it's on my list. |
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.
Changes all look good except for one tiny comment about naming/docs. However I think we should consider this blocked on elastic/cloud-on-k8s#5834. Not sure if you should (or want to) fix that too.
Co-authored-by: David Turner <[email protected]>
@DaveCTurner I was eager to merge this but I understand we want to make sure cloud sets the settings correctly :) |
@DaveCTurner thinking more about this: The current condition for the warning is if the seed_hosts is set, and it is non-empty. I think the cloud uses either the file method (without the seed_hosts at all) or might set it to an empty list. So I think the current code should be OK for the cloud. Or do they populate seed_hosts for some reason for single-node clusters? (I remind we don't look now at all the last discovered hosts) |
I think this works fine as-is in Cloud (i.e. ESS) but not in ECK. |
@DaveCTurner , ah I see! I think ECK does not set seed_hosts at all, so they should not get the warning (as we do not look now for last discovered hosts -- which would include the unicast_hosts.txt file). I can test ECK with a single-node to confirm. Will try to see if they have instructions on testing. |
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.
Aha, right, thanks for the correction. I lost track of this in all the iterations. You're right, this should be fine for both ECK and ESS.
Thanks @DaveCTurner ! By the way, I believe the issue elastic/cloud-on-k8s#5834 might not be needed anymore with our new approach. Should we propose to close it? |
No I think the ECK issue still has value even now. If a node cannot find the master then it will (eventually) emit log messages about all the addresses it's trying, which will include the default seed addresses if this setting isn't set, and that just causes confusing noise. |
Ah, that's another message that gets emitted while trying to find masters. OK, thanks for the explanation! Will merge this when it passes the tests. |
Expands the message added in elastic#88013 to include a link to the relevant docs.
Expands the message added in #88013 to include a link to the relevant docs.
Expands the message added in elastic#88013 to include a link to the relevant docs.
For fully-formed single-node clusters, emit a periodic warning if
seed hosts have been configured.
Closes #85222