fix: cap health check start interval by remaining start period#52317
Open
ogulcanaydogan wants to merge 1 commit intomoby:masterfrom
Open
fix: cap health check start interval by remaining start period#52317ogulcanaydogan wants to merge 1 commit intomoby:masterfrom
ogulcanaydogan wants to merge 1 commit intomoby:masterfrom
Conversation
Contributor
Author
|
The CI failures (OracleLinux 8, snapshotter, and all Windows test jobs) appear to be infrastructure-related rather than caused by this change — the fix only modifies health check interval logic in |
Contributor
|
Restarting the failed tests didn't work ... I'll close and reopen to get a new run. |
When HealthStartPeriod < HealthStartInterval, the monitor would wait for the full start interval before the next probe even after the start period ended. Cap the returned interval to the remaining start period so the transition to the regular probe cadence is not delayed. For example with StartPeriod=2s and StartInterval=30s, the monitor now probes at 2s instead of waiting until 30s. Fixes moby#46747 Signed-off-by: Ogulcan Aydogan <[email protected]>
f78e92f to
db01679
Compare
Contributor
Author
|
CI is green now — thanks for the close/reopen to retrigger it @robmry! Happy to address any further feedback. |
Contributor
Author
|
CI is green. Ready when you have a moment, @robmry. |
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.
Description
When HealthStartPeriod < HealthStartInterval, the health monitor waits for the full start interval before the next probe, even after the start period has ended. This delays the transition to the regular probe cadence.
For example with StartPeriod=2s and StartInterval=30s, the container's health status would not transition to unhealthy until ~30s instead of ~2s.
Fix
Cap the interval returned during the start period to the remaining time, so the monitor wakes up when the start period ends rather than sleeping past it.
Testing
Build compiles successfully. The fix is a minimal change to the interval calculation in the existing getInterval closure.
Fixes #46747