Skip to content

Commit

Permalink
Fix ScheduledDowntimes replicating on restart
Browse files Browse the repository at this point in the history
fixes #4272
  • Loading branch information
Crunsher committed Jun 8, 2018
1 parent ee37c8c commit 0fc5db8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/icinga/scheduleddowntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions lib/icinga/scheduleddowntime.ti
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0fc5db8

Please sign in to comment.