You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dependency::IsAvailable() currently simply returns true both in situations where the dependency is satisfied and where it should be more or less ignored:
Before the introduction of redundancy groups, this was perfectly fine as both situations could be handled identically. However, with redundancy groups, that's no longer the case and this can result in strange effects.
Imagine the following situation: one child, depending on two parents in a redundancy group where both parents are critical. Intuitively, in that case the redundancy group is failed and the child should be considered unreachable. But what happens if (at least) one of the dependencies has a timeperiod configured and it's currently outside of that period? Dependency::IsAvailable() returns true and thus the redundancy groups finds an available dependency and treats the whole group as available.
Instead, the individual dependencies should probably have three states instead: available, failed, and irrelevant (because outside of the timeperiod, there may be other cases where it's irrelevant, timeperiods are just what caught my attention). Combining the state of individual dependency objects should then ignore irrelevant ones.
Dependency::IsAvailable()
currently simply returnstrue
both in situations where the dependency is satisfied and where it should be more or less ignored:icinga2/lib/icinga/dependency.cpp
Lines 266 to 338 in 8714f72
Before the introduction of redundancy groups, this was perfectly fine as both situations could be handled identically. However, with redundancy groups, that's no longer the case and this can result in strange effects.
Imagine the following situation: one child, depending on two parents in a redundancy group where both parents are critical. Intuitively, in that case the redundancy group is failed and the child should be considered unreachable. But what happens if (at least) one of the dependencies has a timeperiod configured and it's currently outside of that period?
Dependency::IsAvailable()
returns true and thus the redundancy groups finds an available dependency and treats the whole group as available.Instead, the individual dependencies should probably have three states instead: available, failed, and irrelevant (because outside of the timeperiod, there may be other cases where it's irrelevant, timeperiods are just what caught my attention). Combining the state of individual dependency objects should then ignore irrelevant ones.
refs https://github.com/Icinga/icinga2/pull/10290#discussion_r1950625454[^1]
The text was updated successfully, but these errors were encountered: