]> granicus.if.org Git - icinga2/commitdiff
Fix ScheduledDowntimes replicating on restart 6359/head
authorJean Flach <jean-marcel.flach@icinga.com>
Fri, 8 Jun 2018 08:54:06 +0000 (10:54 +0200)
committerJean Flach <jean-marcel.flach@icinga.com>
Fri, 8 Jun 2018 08:54:06 +0000 (10:54 +0200)
fixes #4272

lib/icinga/scheduleddowntime.cpp
lib/icinga/scheduleddowntime.ti

index d8120691ff05b5e16272e5659002c3e029865edb..6a715fc401ae1f4c04a620a71dc4a4660ab40cec 100644 (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) {
index 10e88417bce4eec1bee2643542c5c269b8722d60..e119eaa11b73323aa9575ce0a3b499cb142bf5de 100644 (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;