icingadb
icingadb copied to clipboard
Downtime on a removed object are never closed.
Describe the bug
If a object with a Downtime gets disabled (even just temporary) the end of the associated Downtime is never written out to the IDO / IcingaDB.
To Reproduce
- Create a host in the director and deploy it.
- Create a downtime on the host
- Use the director to roll back to an older version 4.Redeploy the new version
Expected behavior
I would expect the Downtime to be terminated once the object is deactivated (The actual_end_time set to the current time). But since the downtime is dropped without ever setting this field, the object looks in the reports as if it where in a constant downtime. which does not correspond to the internal state of icinga2.