icinga2
icinga2 copied to clipboard
Don't expose `Internal.run_with_activation_context`
Currently, Internal.run_with_activation_context is still available at runtime and can be (mis)used in user configuration. I can't imagine a valid use case for this function there and its use would most likely result in an inconsistent state anyways (newly created objects that aren't properly synced/started).
For most members of Internal, Internal.remove("MemberName") is done at some point. The same could also be done for run_with_activation_context. However, we should also check if exposing this function to the DSL is even needed in the first place, or if we could just load the early config that uses this function in an activation context by default.
if we could just load the early config that uses this function in an activation context by default
~This would violate icinga2 daemon -z.~
Two questions:
- How would it violate this?
- What does this option even exist for?