Skip to content

Conversation

@w1ll-i-code
Copy link
Contributor

@cla-bot
Copy link

cla-bot bot commented Jan 21, 2025

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: William Calliari.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@w1ll-i-code w1ll-i-code force-pushed the 10303-downtime-on-removed-object-never-closed branch from 3f209d7 to df2146d Compare January 21, 2025 14:05
@cla-bot cla-bot bot added the cla/signed label Jan 21, 2025
@yhabteab
Copy link
Member

Hi, sorry for the delay!

However, this PR will not solve the problem described in Icinga/icingadb#910. The problem is caused by an Icinga Director deployment and a Director deployment means that the entire process is replaced by a new one with its own configuration. It is like removing an object Service "foo" { ... from one of the conf files and then reloading Icinga 2, and in such cases there will be no deletion event for this service. If that service has had some downtime assigned to it, then they are simply dangling objects from that moment on and Icinga 2 will not be able to load them, so they will simply be silently deleted. In order to fix this, major refactoring and design changes are required, so it's not something that's easy to fix, as already outlined in Icinga/icingadb#910.

What this PR is trying to do is already done here (although the variable name parents is confusing, it should actually be children). When you remove a service via the API, all of its children, including downtime, are automatically removed.

for (auto& parentObj : parents) {
DeleteObjectHelper(parentObj, cascade, errors, diagnosticInformation, cookie);
}

@yhabteab
Copy link
Member

See Icinga/icingadb#910 (comment)!

@yhabteab yhabteab closed this Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Downtime on a removed object are never closed.

2 participants