From: Michael Friedrich Date: Fri, 3 Jun 2016 12:16:52 +0000 (+0200) Subject: Ensure that obsolete comment/downtime objects are deleted after activating objects X-Git-Tag: v2.5.0~282 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b742e841f250a8f55596d0f4393007f44b1aa99;p=icinga2 Ensure that obsolete comment/downtime objects are deleted after activating objects Config validation shouldn't be able to purge the files, only on restart. fixes #11890 --- diff --git a/lib/cli/daemoncommand.cpp b/lib/cli/daemoncommand.cpp index 5d8e6f5dd..54bdda450 100644 --- a/lib/cli/daemoncommand.cpp +++ b/lib/cli/daemoncommand.cpp @@ -20,6 +20,7 @@ #include "cli/daemoncommand.hpp" #include "cli/daemonutility.hpp" #include "remote/apilistener.hpp" +#include "remote/configobjectutility.hpp" #include "config/configcompiler.hpp" #include "config/configcompilercontext.hpp" #include "config/configitembuilder.hpp" @@ -296,6 +297,9 @@ int DaemonCommand::Run(const po::variables_map& vm, const std::vector& configs, WorkQueue upq(25000, Application::GetConcurrency()); bool result = ConfigItem::CommitItems(ascope.GetContext(), upq, newItems); - /* Remove ignored Downtime/Comment objects. */ - ConfigItem::RemoveIgnoredItems(ConfigObjectUtility::GetConfigDir()); - if (!result) return false;