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
Adding a wait-for-status parameter to the health_report API #107963
base: main
Are you sure you want to change the base?
Adding a wait-for-status parameter to the health_report API #107963
Conversation
Documentation preview: |
Hi @masseyke, I've created a changelog YAML for you. |
…masseyke/elasticsearch into adding-wait-for-status-to-health-report
Hmm I'm a bit hesitant to do this. All those |
Also we're only waiting on cluster state updates here, but I believe the health report API will change state for reasons that don't directly relate to a cluster state update. |
Yeah good point. The reason I originally set out to deal with was the status being |
I could see value in waiting until the health service comes up, similar to how |
@dct @masseyke I'm afraid we currently don't have a way to determine whether the health service is online. The log line Either we'll have to implement a mechanism for determining whether the health service is online, or we're back to the original idea of this PR -- where we'd still need to address David's point regarding health updates not necessarily resulting in cluster state updates. I admittedly don't immediately have a good idea for such a mechanism. |
More strongly, I think the health API should wait to respond in the situation where it hasn't heard from all nodes yet, only returning |
Ah yeah that could work I think. I wonder what would be a good default behavior. If a cluster has trouble starting up (i.e. it's not just slowly starting up, it's not starting up) or a new node has issues, it might be confusing if the Health API takes 10/30/whatever seconds to load. Also, we'd need to take managed/internal use cases into account (e.g. the health page on cloud.elastic.co and maybe AutoOps in the future). |
This adds a
wait-for-status
parameter to the health_report API, much like the one already in the cluster health API. This is mainly useful in integration tests, where we want to wait until the cluster is in a known state before proceeding. For a multi-node cluster it can take a little time for the health node to come up and start reporting.Closes #107796