Skip to content

Downtime#HasValidConfigOwner() endlessly waits for 0 ScheduledDowntimes #8812

Open
@Al2Klimov

Description

@Al2Klimov

Describe the bug

Since #6826 Downtime#HasValidConfigOwner() doesn’t dispute config owner validity until all ScheduledDowntimes are loaded.

But if there aren’t any ScheduledDowntimes at all, HasValidConfigOwner returns always true and orphaned Downtimes are never deleted.

To Reproduce

  1. Create a checkable and apply a ScheduledDowntime to it
  2. Wait for the ScheduledDowntime to create a Downtime
  3. Remove all ScheduledDowntimes config
  4. Restart Icinga
  5. Wait for the Downtime to disappear (won’t happen)

Expected behavior

Downtime#HasValidConfigOwner() doesn’t need any ScheduledDowntimes to be present to see that there aren’t any more of them to load.

Your Environment

8b516f0

Additional context

ref/IP/32533

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/runtimeDowntimes, comments, dependencies, eventsbugSomething isn't workingref/IP

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions