fix(api): check readiness immediately on startup - #13796
Open
wangjingshuiku wants to merge 1 commit into
Open
wangjingshuiku wants to merge 1 commit into
wangjingshuiku wants to merge 1 commit into
Conversation
wangjingshuiku
requested review from
Kubuxu,
LexLuthr and
rvagg
as code owners
September 12, 2026 16:39
Contributor
|
Do you observe the check succeeding immediately after applying this patch? Some machinery might still be starting when the handler is created, causing the immediate check to fail. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
No issue. This is a small correctness fix for the existing
/health/readyzendpoint.Related context: #12587 documents that
/health/readyzis intended to be used as a Kubernetes readiness endpoint.Proposed Changes
NewReadyHandlerstarts, rather than waiting for the first one-minute ticker interval.CHANGELOG.md.Additional Info
HealthHandlerstarts in the unhealthy state. Previously,NewReadyHandleronly evaluatedNetAutoNatStatusandNodeStatusafter the firsttime.Minuteticker event. As a result, an otherwise-ready node could return HTTP 503 from/health/readyzfor up to one minute after the handler was created.This can unnecessarily keep a healthy Lotus node out of a Kubernetes Service or load-balancer pool during startup.
The readiness criteria themselves are unchanged. This change only performs the same check once immediately before continuing with the existing periodic checks.
PR #8692 describes the health endpoints as being useful for Kubernetes readiness and liveness probes. Issue #12587 also confirms that
/health/readyzis intended specifically as a Kubernetes readiness endpoint.Checklist
Before you mark the PR ready for review, please make sure that:
CHANGELOG.md.