fix: health should ignore max_unavailable [NR-365513]#1051
Merged
paologallinaharbur merged 4 commits intomainfrom Feb 10, 2025
Merged
fix: health should ignore max_unavailable [NR-365513]#1051paologallinaharbur merged 4 commits intomainfrom
paologallinaharbur merged 4 commits intomainfrom
Conversation
| // I.e. we are reporting healthy also whenever there is an instance running an old version. | ||
| pub fn check_health_single_daemon_set(ds: &DaemonSet) -> Result<Health, HealthCheckerError> { | ||
| let name = client_utils::get_metadata_name(ds)?; | ||
| let status = Self::get_daemon_set_status(name.as_str(), ds)?; |
Contributor
There was a problem hiding this comment.
working on de deployment i see this same pattern, should we fail because of this?
not having status is an expected situation right?
I fear to pollute logs becase of this, perhaps we need to report unhealthy but not fail the health checker
Contributor
There was a problem hiding this comment.
I though that the status is supposed to be there 🤔 (probably there are scenarios I'm not aware of). If it is expected, I agree we should not fail (even if failing also reports unhealthy in the end)
Member
Author
There was a problem hiding this comment.
Have you seen often that log?
By the way it fails, but at the end it is returning unhealthy, not beaking anything
let health = health_checker.check_health().unwrap_or_else(|err| {
debug!(agent_id = %agent_id_clone, last_error = %err, "the configured health check failed");
HealthWithStartTime::from_unhealthy(Unhealthy::from(err), sub_agent_start_time)
});
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.
Before we were taking too many variables into account, but we took wrong assumptions:
Therefore, we were always taking into account max_unavailable, making very easy to report false negatives.
The implementation got simplified aiming to report unhealthy if not all the pods expected are ready:
Moreover, please notice that following the APM case: