icinga2 icon indicating copy to clipboard operation
icinga2 copied to clipboard

Don't expose `Internal.run_with_activation_context`

Open julianbrost opened this issue 3 years ago • 2 comments

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.

julianbrost avatar Jul 21 '22 13:07 julianbrost

if we could just load the early config that uses this function in an activation context by default

~This would violate icinga2 daemon -z.~

Al2Klimov avatar Jul 26 '22 15:07 Al2Klimov

Two questions:

  1. How would it violate this?
  2. What does this option even exist for?

julianbrost avatar Jul 27 '22 08:07 julianbrost