Checkable: Don't skip redundancy group checks for parent dependencies#10228
Closed
Checkable: Don't skip redundancy group checks for parent dependencies#10228
Conversation
4ad59ed to
492621a
Compare
Al2Klimov
reviewed
Nov 13, 2024
| std::string redundancy_group = dep->GetRedundancyGroup(); | ||
| bool parentReachable{true}; | ||
| if (Checkable::Ptr parent = dep->GetParent(); parent.get() != this) { | ||
| parentReachable = parent->IsReachable(dt, failedDependency, rstack + 1); |
Member
There was a problem hiding this comment.
Admittedly other construction area, but while on it, you could increment rstack just once before the loop.
Member
Author
There was a problem hiding this comment.
Ah, because currently the sum of all direct and intermediate dependencies is limited to 256. You want me to change this so that the limit applies to each dependency object individually? I can do this, but as you already said, it's not related to this issue.
492621a to
ddc9e46
Compare
Al2Klimov
reviewed
Nov 14, 2024
ddc9e46 to
cab27fc
Compare
Al2Klimov
reviewed
Nov 14, 2024
cab27fc to
af33327
Compare
Previously, all parent dependencies were recursively checked right at the beginning of `Checkable::IsReachable()` for reachability and immediately returned `false` if one of them fails. However, since the introduction of `redundancy_group`, that failed parent might be within a redundancy group, which shouldn't necessarily cause the dependency to fail completely. This PR changes this insofar as not all parents are checked at the beginning of the method, but only a single parent per a dependency object is evaluated.
af33327 to
d7936cd
Compare
Member
Author
|
Superseded by #10290. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, all parent dependencies were recursively checked right at the beginning of
Checkable::IsReachable()for reachability and immediately returnedfalseif one of them fails. However, since the introduction ofredundancy_group, that failed parent might be within a redundancy group, which shouldn't necessarily cause the dependency to fail completely. This PR changes this insofar as not all parents are checked at the beginning of the method, but only a single parent per a dependency object is evaluated.Tests
Icinga 2 Config
Before
Now, change the dummy state for the
motherHost tovars.dummy_state = 0.After
Now, change the dummy state for the
motherHost tovars.dummy_state = 0.fixes #10014