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

Fix hard recovery on final check attempt #758

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog
Expand Up @@ -11,6 +11,7 @@ FIXES
* Fixed build process when using GCC 10 (#721) (Michael Orlitzky)
* Fixed postauth vulnerabilities in histogram.js, map.js, trends.js (CVE-2020-1408) (Thanks UraSec Team) (Sebastian Wolf)
* When using systemd, configuration will be verified before reloading (#715) (tatref)
* Fixed HARD OK states triggering on the maximum check attempt (#757) (Sebastian Wolf)

4.4.5 - 2019-08-20
------------------
Expand Down
2 changes: 1 addition & 1 deletion base/checks.c
Expand Up @@ -1490,7 +1490,7 @@ int handle_async_service_check_result(service *svc, check_result *cr)
}

if (svc->current_attempt >= svc->max_attempts &&
(svc->current_state != new_last_hard_state || svc->state_type == SOFT_STATE)) {
(svc->current_state != new_last_hard_state || (svc->state_type == SOFT_STATE && svc->current_state != STATE_OK))) {

log_debug_info(DEBUGL_CHECKS, 2, "Service had a HARD STATE CHANGE!!\n");

Expand Down