Merge pull request #6359 from Icinga/fix/scheduled-downtimes

Fix ScheduledDowntimes replicating on restart
This commit is contained in:
Michael Friedrich 2018-06-08 16:26:46 +02:00 committed by GitHub
commit eee30750d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -176,6 +176,9 @@ void ScheduledDowntime::CreateNextDowntime()
return;
}
Log(LogDebug, "ScheduledDowntime")
<< "Creating new Downtime for ScheduledDowntime \"" << GetName() << "\"";
std::pair<double, double> segment = FindNextSegment();
if (segment.first == 0 && segment.second == 0) {

View File

@ -36,6 +36,10 @@ public:
class ScheduledDowntime : CustomVarObject < ScheduledDowntimeNameComposer
{
// Scheduled Downtimes have a dependency on Downtimes. This is to make sure ScheduledDowntimes are activated after
// the Downtimes (and other checkables)
activation_priority 20;
load_after Host;
load_after Service;