mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-16 10:14:28 +02:00
Checkable#ProcessCheckResult(): call Checkable::OnReachabilityChanged last
to ensure Checkable#IsReachable() returns correctly for dependency children inside OnReachabilityChanged(). That needs the dependency parent to be already in the correct state. refs #9143
This commit is contained in:
parent
3c8c248508
commit
4ea65076b0
@ -215,10 +215,6 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
|||||||
|
|
||||||
ResetNotificationNumbers();
|
ResetNotificationNumbers();
|
||||||
SaveLastState(ServiceOK, cr->GetExecutionEnd());
|
SaveLastState(ServiceOK, cr->GetExecutionEnd());
|
||||||
|
|
||||||
/* update reachability for child objects in OK state */
|
|
||||||
if (!children.empty())
|
|
||||||
OnReachabilityChanged(this, cr, children, origin);
|
|
||||||
} else {
|
} else {
|
||||||
/* OK -> NOT-OK change, first SOFT state. Reset attempt counter. */
|
/* OK -> NOT-OK change, first SOFT state. Reset attempt counter. */
|
||||||
if (IsStateOK(old_state)) {
|
if (IsStateOK(old_state)) {
|
||||||
@ -241,10 +237,6 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
|||||||
if (!IsStateOK(cr->GetState())) {
|
if (!IsStateOK(cr->GetState())) {
|
||||||
SaveLastState(cr->GetState(), cr->GetExecutionEnd());
|
SaveLastState(cr->GetState(), cr->GetExecutionEnd());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update reachability for child objects in NOT-OK state */
|
|
||||||
if (!children.empty())
|
|
||||||
OnReachabilityChanged(this, cr, children, origin);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (recovery) {
|
if (recovery) {
|
||||||
@ -514,6 +506,10 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
|||||||
SetSuppressedNotifications(suppressed_types_after);
|
SetSuppressedNotifications(suppressed_types_after);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* update reachability for child objects */
|
||||||
|
if (!children.empty())
|
||||||
|
OnReachabilityChanged(this, cr, children, origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Checkable::ExecuteRemoteCheck(const Dictionary::Ptr& resolvedMacros)
|
void Checkable::ExecuteRemoteCheck(const Dictionary::Ptr& resolvedMacros)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user