icinga2/lib/icinga
Julian Brost 8e7e687b96 Unify depependency cycle check code.
This commit removes a distinction in how dependency objects are checked for
cycles in the resulting graph depending on whether they are part of the
initially loaded configuration during process startup or as part of a runtime
update.

The DependencyCycleChecker helper class is extended with a mechanism that
allows additional dependencies to be considered during the cycle search. This
allows using it to check for cycles before actually registering the
dependencies with the checkables.

The aforementioned case-distinction for initial/runtime-update config is
removed by making use of the newly added BeforeOnAllConfigLoaded signal to
perform the cycle check at once for each batch of dependencies inside
ConfigItem::CommitNewItems() for both cases now. During the initial config
loading, there can be multiple batches of dependencies as objects from apply
rules are created separately, so parts of the dependency graph might be visited
multiple times now, however that is limited to a minimum as only parts of the
graph that are reachable from the newly added dependencies are searched.
2025-03-12 11:53:30 +01:00
..
CMakeLists.txt Introduce EnvResolver 2023-02-06 11:25:25 +01:00
apiactions.cpp Introduce & use enum `DowntimeRemovalReason` 2024-05-23 09:34:15 +02:00
apiactions.hpp Refactor GetSingleObjectByNameUsingPermissions 2020-07-07 15:45:58 +02:00
apievents.cpp ApiEvents: Implement new API event streams response 2021-01-11 14:59:48 +01:00
apievents.hpp ApiEvents: Implement new API event streams response 2021-01-11 14:59:48 +01:00
checkable-check.cpp doc/: fix "a HA" -> "an HA" 2024-10-24 09:44:36 +02:00
checkable-comment.cpp Checkable#RemoveAckComments(): add optional comment entry time filter 2023-03-03 15:48:11 +01:00
checkable-dependency.cpp Code style 2023-04-03 13:39:08 +02:00
checkable-downtime.cpp Remove unused Checkable#RemoveAllDowntimes() 2024-05-21 14:28:39 +02:00
checkable-event.cpp CONTEXT: use << everywhere to unify usages 2022-11-30 11:06:51 +01:00
checkable-flapping.cpp Flapping: Allow to ignore states in flapping calculation 2021-01-20 11:09:03 +01:00
checkable-notification.cpp Use `Checkable::GetStateBeforeSuppression()` only where relevant 2024-10-11 13:21:10 +02:00
checkable-script.cpp Fix file endings 2023-05-17 18:05:13 +02:00
checkable.cpp Use Timer::Create() instead of new Timer() 2023-04-04 10:35:20 +02:00
checkable.hpp Remove unused Checkable#RemoveAllDowntimes() 2024-05-21 14:28:39 +02:00
checkable.ti Checkable: improve state notifications after suppression ends 2022-03-03 14:25:23 +01:00
checkcommand.cpp Use ExecuteOverride to override the command 2020-07-31 17:28:33 +02:00
checkcommand.hpp Don't mark a method as `virtual` in a `final` class 2023-01-26 09:10:38 +01:00
checkcommand.ti
checkresult.cpp Initialize namespaces without using `overrideFrozen` 2023-01-19 09:53:36 +01:00
checkresult.hpp
checkresult.ti Make ProcessResult#ExitStatus and CheckResult#exit_status 64-bit ints 2024-04-23 17:45:31 +02:00
cib.cpp Simplify NamespaceValue class hierarchy to one struct without member functions 2023-01-19 17:55:11 +01:00
cib.hpp Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
clusterevents-check.cpp Use Timer::Create() instead of new Timer() 2023-04-04 10:35:20 +02:00
clusterevents.cpp Notification#BeginExecuteNotification(): on recovery clear last_notified_state_per_user 2023-12-13 13:21:22 +01:00
clusterevents.hpp Notification#BeginExecuteNotification(): on recovery clear last_notified_state_per_user 2023-12-13 13:21:22 +01:00
command.cpp Remove redundant "Validation failed" prefix from ValidationError exceptions 2024-10-23 13:06:12 +02:00
command.hpp
command.ti Introduce Command#arguments[].sep 2022-05-11 17:50:12 +02:00
comment.cpp icinga2: address comment loading where host reference is not found 2024-03-11 12:42:23 +01:00
comment.hpp Introduce Comment#sticky 2022-03-24 16:42:18 +01:00
comment.ti Don't allow to change object parent,host/service_name at runtime 2022-09-09 18:26:28 +02:00
compatutility.cpp Remove CheckResultReader which has been deprecated for 5 major versions 2023-04-03 11:39:21 +02:00
compatutility.hpp
customvarobject.cpp Fix file endings 2023-05-17 18:05:13 +02:00
customvarobject.hpp
customvarobject.ti Icinga DB: Make sure object relationships are handled correctly 2021-11-12 13:34:57 +01:00
dependency-apply.cpp CONTEXT: use << everywhere to unify usages 2022-11-30 11:06:51 +01:00
dependency.cpp Unify depependency cycle check code. 2025-03-12 11:53:30 +01:00
dependency.hpp Unify depependency cycle check code. 2025-03-12 11:53:30 +01:00
dependency.ti Introduce redundancy groups for Dependency Objects 2023-02-21 16:23:36 +01:00
downtime.cpp Don't fail to remove obsolete downtimes 2024-05-23 10:09:41 +02:00
downtime.hpp Introduce & use enum `DowntimeRemovalReason` 2024-05-23 09:34:15 +02:00
downtime.ti Don't allow to change object parent,host/service_name at runtime 2022-09-09 18:26:28 +02:00
envresolver.cpp Introduce EnvResolver 2023-02-06 11:25:25 +01:00
envresolver.hpp Introduce EnvResolver 2023-02-06 11:25:25 +01:00
eventcommand.cpp Use ExecuteOverride to override the command 2020-07-31 17:28:33 +02:00
eventcommand.hpp Don't mark a method as `virtual` in a `final` class 2023-01-26 09:10:38 +01:00
eventcommand.ti
externalcommandprocessor.cpp Introduce & use enum `DowntimeRemovalReason` 2024-05-23 09:34:15 +02:00
externalcommandprocessor.hpp Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
host.cpp Implement scheduling_source attribute (#6326) 2021-07-20 11:10:26 +02:00
host.hpp Checkable: Add test for state notifications after a suppression ends 2022-03-03 14:25:23 +01:00
host.ti Replace EventuallyAtomic with AtomicOrLocked which falls back to a mutex 2022-05-03 12:02:46 +02:00
hostgroup.cpp CONTEXT: use << everywhere to unify usages 2022-11-30 11:06:51 +01:00
hostgroup.hpp Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
hostgroup.ti Replace EventuallyAtomic with AtomicOrLocked which falls back to a mutex 2022-05-03 12:02:46 +02:00
i2-icinga.hpp
icinga-itl.conf
icingaapplication.cpp MacroProcessor::ResolveMacro(): treat quasi-CV-object IcingaApplication as real CV-object 2023-05-31 16:35:09 +02:00
icingaapplication.hpp
icingaapplication.ti
legacytimeperiod.cpp Merge pull request #9983 from Icinga/broken-timeperiod 2024-08-20 10:05:59 +02:00
legacytimeperiod.hpp LegacyTimePeriod: Prevent modification of input parameters 2021-07-22 15:17:06 +02:00
macroprocessor.cpp MacroProcessor::ResolveMacro(): treat quasi-CV-object IcingaApplication as real CV-object 2023-05-31 16:35:09 +02:00
macroprocessor.hpp ResolverSpec: add option not to resolve "$name$" 2023-02-06 16:39:17 +01:00
macroresolver.hpp Refactor MacroResolver::OverrideMacros 2020-07-03 15:53:51 +02:00
notification-apply.cpp CONTEXT: use << everywhere to unify usages 2022-11-30 11:06:51 +01:00
notification.cpp Don't set Notification#no_more_notifications on custom notifications 2024-11-15 13:03:22 +01:00
notification.hpp Fix build on Mac with -DICINGA2_UNITY_BUILD=OFF -DICINGA2_WITH_LIVESTATUS=ON 2024-09-27 12:41:11 +02:00
notification.ti Notification#BeginExecuteNotification(): track state change notifications 2023-12-07 12:43:30 +01:00
notificationcommand.cpp Use ExecuteOverride to override the command 2020-07-31 17:28:33 +02:00
notificationcommand.hpp Use ExecuteOverride to override the command 2020-07-31 17:28:33 +02:00
notificationcommand.ti
objectutils.cpp
objectutils.hpp
pluginutility.cpp PluginUtility: Fix PerfData don't get parsed correctly 2023-04-05 15:37:54 +02:00
pluginutility.hpp PluginUtility::FormatPerfdata(): normalize UoMs if desired 2021-07-05 19:05:32 +02:00
scheduleddowntime-apply.cpp CONTEXT: use << everywhere to unify usages 2022-11-30 11:06:51 +01:00
scheduleddowntime.cpp Introduce & use enum `DowntimeRemovalReason` 2024-05-23 09:34:15 +02:00
scheduleddowntime.hpp Targeted apply rules: don't unnecessarily eval filter 2022-10-28 14:27:53 +02:00
scheduleddowntime.ti Don't allow to change object parent,host/service_name at runtime 2022-09-09 18:26:28 +02:00
service-apply.cpp CONTEXT: use << everywhere to unify usages 2022-11-30 11:06:51 +01:00
service.cpp Service#GetSeverity(): behave as the respective IDO query of Icinga Web 2022-01-27 12:21:06 +01:00
service.hpp Targeted apply rules: don't unnecessarily eval filter 2022-10-28 14:27:53 +02:00
service.ti Don't allow to change object parent,host/service_name at runtime 2022-09-09 18:26:28 +02:00
servicegroup.cpp CONTEXT: use << everywhere to unify usages 2022-11-30 11:06:51 +01:00
servicegroup.hpp Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
servicegroup.ti Replace EventuallyAtomic with AtomicOrLocked which falls back to a mutex 2022-05-03 12:02:46 +02:00
timeperiod.cpp Check segemnt start date inclusively in `TimePeriod::IsInside()` 2024-08-01 16:16:48 +02:00
timeperiod.hpp
timeperiod.ti Replace EventuallyAtomic with AtomicOrLocked which falls back to a mutex 2022-05-03 12:02:46 +02:00
user.cpp Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
user.hpp Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
user.ti Replace EventuallyAtomic with AtomicOrLocked which falls back to a mutex 2022-05-03 12:02:46 +02:00
usergroup.cpp Fix file endings 2023-05-17 18:05:13 +02:00
usergroup.hpp Fix build on Mac with -DICINGA2_UNITY_BUILD=OFF -DICINGA2_WITH_LIVESTATUS=ON 2024-09-27 12:41:11 +02:00
usergroup.ti Replace EventuallyAtomic with AtomicOrLocked which falls back to a mutex 2022-05-03 12:02:46 +02:00