Skip to content
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

Merged

Conversation

kingherc
Copy link
Contributor

For fully-formed single-node clusters, emit a periodic warning if
seed hosts have been configured.

Closes #85222

@kingherc kingherc force-pushed the feature/single-node-cluster-discovery branch 2 times, most recently from cfec8eb to 795a6c4 Compare June 24, 2022 13:45
@kingherc kingherc marked this pull request as ready for review June 24, 2022 13:51
@kingherc kingherc requested a review from DaveCTurner June 24, 2022 13:51
@kingherc kingherc added >enhancement :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. labels Jun 24, 2022
@elasticmachine
Copy link
Collaborator

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
@kingherc kingherc force-pushed the feature/single-node-cluster-discovery branch from 795a6c4 to 2e243c4 Compare June 24, 2022 14:10
Copy link
Contributor

@DaveCTurner DaveCTurner left a 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.

@DaveCTurner DaveCTurner added the cloud-deploy Publish cloud docker image for Cloud-First-Testing label Jun 27, 2022
@DaveCTurner
Copy link
Contributor

Also I've added the cloud-deploy label, it would be good to confirm (manually) that this doesn't trigger any warnings on single-node Cloud clusters.

@kingherc
Copy link
Contributor Author

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?

@kingherc
Copy link
Contributor Author

Hi @DaveCTurner , also pushed suggested changes, please check once more.

@DaveCTurner
Copy link
Contributor

How can I manually test it on a single-node cloud cluster?

I shared a link to the internal docs in another channel.

@kingherc
Copy link
Contributor Author

@elasticmachine test this

@kingherc
Copy link
Contributor Author

@DaveCTurner please check once more and review.

@kingherc
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-tests-unix-sample

1 similar comment
@kingherc
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-tests-unix-sample

@kingherc
Copy link
Contributor Author

Hi @DaveCTurner , PR is ready for your review.

@DaveCTurner
Copy link
Contributor

👍 sorry I'm unlikely to get to this today now, but it's on my list.

Copy link
Contributor

@DaveCTurner DaveCTurner left a 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.

@kingherc
Copy link
Contributor Author

@DaveCTurner I was eager to merge this but I understand we want to make sure cloud sets the settings correctly :)
By the way, when I tested it, I did see that seed_hosts was set to []. So the elastic/cloud-on-k8s#5834 is to make sure it truly happens and it's not by chance?

@kingherc
Copy link
Contributor Author

@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)

@DaveCTurner
Copy link
Contributor

I think this works fine as-is in Cloud (i.e. ESS) but not in ECK.

@kingherc
Copy link
Contributor Author

@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.

Copy link
Contributor

@DaveCTurner DaveCTurner left a 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.

@kingherc
Copy link
Contributor Author

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?

@DaveCTurner
Copy link
Contributor

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.

@kingherc
Copy link
Contributor Author

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.

@kingherc kingherc merged commit 50d2cf3 into elastic:master Jun 30, 2022
@kingherc kingherc deleted the feature/single-node-cluster-discovery branch June 30, 2022 13:35
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Aug 22, 2024
Expands the message added in elastic#88013 to include a link to the relevant
docs.
DaveCTurner added a commit that referenced this pull request Aug 27, 2024
Expands the message added in #88013 to include a link to the relevant
docs.
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this pull request Sep 4, 2024
Expands the message added in elastic#88013 to include a link to the relevant
docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloud-deploy Publish cloud docker image for Cloud-First-Testing :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. >enhancement Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

More helpful logs if a single-node cluster has nontrivial discovery config
4 participants