Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #12060: Incomplete "Rules to be applied" summary when accepting a new nodes when using groups of groups #1882

Conversation

fanf
Copy link
Member

@fanf fanf commented Mar 29, 2018

https://www.rudder-project.org/redmine/issues/12060

Implements algorithm described in above ticket (with a test!)

I also added a "NodeLogger" / "NodeLogger.Pending" / "NodeLogger.Pending.Policies" to be able to log (in trace) the behavior of the algo in case we need to debug in prod.
And I changed the use of logger in NewNodeManager to use NodeLogger.Pending (nothing interesing in that file)

@VinceMacBuche
Copy link
Member

What happens if a dynamic group depends on a static group ?

As far as I remember, static groups are not part of the algorithm and will be ignored (empty set) when computing the nodes list of the dynamic group ...

I still need to read the whole algorithm, but i prefere to put the idea here before i forget to tell

@VinceMacBuche
Copy link
Member

I think it should be possible to add them (static groups) in the DONE list when initiailizing the algorithm

@VinceMacBuche
Copy link
Member

However, if the case is not treated, I think it could be merged and done in another PR

@fanf
Copy link
Member Author

fanf commented Mar 30, 2018

Static group are never in TODO not DONE, because they never are in the init set of groups - only dyn groups are processed. So we have a dyngroup remaining in BLOCKED, its dep is set to 0, the rest follow in the common algo.
There is a static group in the test.

@VinceMacBuche
Copy link
Member

In fact we are ok, because the static group cannot contain the nodes we want to check because the node is not accepted and therefore cannot be in static groups ...

@VinceMacBuche
Copy link
Member

VinceMacBuche commented Mar 30, 2018

Static groups do not enter in the algorithm, they are not fetched by the ldap query (ok i read your comment correctly )

@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit c26ba5c into Normation:branches/rudder/4.3 Mar 30, 2018
@fanf fanf deleted the bug_12060/incomplete_rules_to_be_applied_summary_when_accepting_a_new_nodes_when_using_groups_of_groups branch March 15, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants