]> granicus.if.org Git - icinga2/commitdiff
Merge pull request #6821 from Icinga/bugfix/downtimes-disappear-satellite-6542
authorMichael Friedrich <michael.friedrich@icinga.com>
Tue, 18 Dec 2018 15:13:36 +0000 (16:13 +0100)
committerGitHub <noreply@github.com>
Tue, 18 Dec 2018 15:13:36 +0000 (16:13 +0100)
Don't delete downtimes in satellite zones

1  2 
lib/icinga/downtime.cpp

index 4180747ac94c9a1fb6f2cf6282e7967b2abce84f,549b721c1678cf3f57932923de5dce0fe6659abe..d9b24a3d3c11c07ee5abba2a59f391feeb461830
@@@ -210,12 -210,8 +210,12 @@@ bool Downtime::IsExpired() cons
  
  bool Downtime::HasValidConfigOwner() const
  {
 +      if (!ScheduledDowntime::AllConfigIsLoaded()) {
 +              return true;
 +      }
 +
        String configOwner = GetConfigOwner();
-       return configOwner.IsEmpty() || GetObject<ScheduledDowntime>(configOwner);
+       return configOwner.IsEmpty() || Zone::GetByName(GetAuthoritativeZone()) != Zone::GetLocalZone() || GetObject<ScheduledDowntime>(configOwner);
  }
  
  int Downtime::GetNextDowntimeID()