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

[dev.icinga.com #12592] Unexpected state changes with max_check_attempts = 2 #4599

Closed
icinga-migration opened this issue Aug 30, 2016 · 7 comments
Labels
bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/12592

Created by gbeutner on 2016-08-30 07:22:59 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-09-27 09:35:04 +00:00)
Target Version: 2.6.0
Last Update: 2016-09-27 09:35:04 +00:00 (in Redmine)

Icinga Version: 2.5.3
Include in Changelog: 1

Changesets

2016-09-27 09:30:57 +00:00 by mfriedrich 3571965

Fix SOFT/HARD state counting logic for check attempts <= 2

fixes #12592

Relations:

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-08-30 07:23:06 +00:00

  • Relates set to 12530

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-08-30 11:51:33 +00:00

  • Target Version changed from 2.5.4 to 2.6.0
  • Backport? changed from Not yet backported to __

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-09-01 05:03:56 +00:00

  • Duplicated set to 12605

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-09-27 09:21:31 +00:00

  • Relates set to 11898

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-09-27 09:31:27 +00:00

The patch from #11898 introduced that behaviour while fixing another. Overall the state calculation can't be taken as "if-then-else-if-then-else" condition, but

  • First SOFT state transition(reset attempt counter)
  • SOFT state changes (which increases the check attempt counter)
  • HARD state change (sets state type and resets counter)

The bug affects max_check_attempts being 1 or 2.

michi@mbmif ~/coding/icinga/icinga2 (master) $ ./debug/Bin/Debug/boosttest-test-base --run_test=icinga_checkresult/service_3attempts
Running 1 test case...
Before first check result (ok, hard)
First check result (unknown)
Second check result (critical)
Third check result (critical)
Notification triggered: PROBLEM
Fourth check result (ok)
Notification triggered: RECOVERY
Fifth check result (critical)
Sixth check result (ok)

*** No errors detected
michi@mbmif ~/coding/icinga/icinga2 (master) $ ./debug/Bin/Debug/boosttest-test-base --run_test=icinga_checkresult/service_2attempts
Running 1 test case...
Before first check result (ok, hard)
First check result (unknown)
Second check result (critical)
Notification triggered: PROBLEM
Third check result (ok)
Notification triggered: RECOVERY
Fourth check result (critical)
Fifth check result (ok)

*** No errors detected

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-09-27 09:35:04 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 3571965.

@icinga-migration
Copy link
Author

Updated by tobiasvdk on 2016-10-19 19:17:07 +00:00

  • Relates set to 12943

@icinga-migration icinga-migration added bug Something isn't working libicinga labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.6.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant