Merge pull request #9817 from Icinga/flexible-downtimes-disappear-too-early-9797

Downtime#Start(): trigger flexible downtimes not earlier than fixed ones
This commit is contained in:
Alexander Aleksandrovič Klimov 2023-07-05 17:06:03 +02:00 committed by GitHub
commit 45d5a3f5f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,7 +132,8 @@ void Downtime::Start(bool runtimeCreated)
Log(LogNotice, "Downtime")
<< "Checkable '" << checkable->GetName() << "' already in a NOT-OK state."
<< " Triggering downtime now.";
TriggerDowntime(checkable->GetLastStateChange());
TriggerDowntime(std::fmax(std::fmax(GetStartTime(), GetEntryTime()), checkable->GetLastStateChange()));
}
if (GetFixed() && CanBeTriggered()) {