Bug #12060
closedIncomplete "Rules to be applied" summary when accepting a new nodes when using groups of groups
Description
Setup:
I defined a Group A, dynamic, with all nodes
I defined Group B, dynamic, that contains all nodes of group A
I defined a Rule Z, applied to group B
When I accept a node, I'd expect Rule Z to show up in the list of rules to be applied, but it ain't
Note: the same issue will happen with Nodecycle for rules on non-default lifecycle
Files
Updated by François ARMAND almost 7 years ago
- Status changed from New to In progress
- Assignee set to François ARMAND
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 4.3.0~beta1 to 4.3.0~rc1
Updated by Benoît PECCATTE almost 7 years ago
- Severity set to Major - prevents use of part of Rudder | no simple workaround
- User visibility set to Getting started - demo | first install | level 1 Techniques
- Priority changed from 0 to 70
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.3.0~rc1 to 4.3.0~rc2
- Priority changed from 70 to 69
Updated by François ARMAND over 6 years ago
- Translation missing: en.field_tag_list set to Blocking 4.3
Updated by François ARMAND over 6 years ago
- File IMG_20180328_160533.jpg IMG_20180328_160533.jpg added
So, this is how I think we can solve it.
We already have a function which, given a query, is able to tell which nodes match it.
Any dyngroup can be decompose in a simple, fully computable query and the dependance towards other groups, i.e towards other queries (and that, recursively).
The composition between the simple part and the group is either an AND (intersection of nodeids set) or an OR (union of nodeids).
So now, we can build a simple algo with 3 queues: TODO, BLOCKED, DONE. All dyn groups start in TODO. Then, we proceed the TODO queue iteratively. When a node has N dep (N > 0), it goes into BLOCKED.
Then, each time a group is fully computable (no dep), the set of nodeid matching it is evaluated, and it goes into DONE.
At that point, we put back each group in BLOCKED which were only blocked by the newly finished group at the end of TODO queue, and for each, we intersect or union the set of nodes matching.
We are sure to progress by at least one element in TODO (even when we put back some from BLOCKED, and BLOCKED never get refilled), so at some point TODO is empty. If some groups remain in BLOCKED, it means their dependencies can't be computed (mutual dependencies of dep towards static groups). We set these dependencies to nodeids == empty set, and we do the final TODO processing (after union/intersec).
And done!
An imagine to illustrate the process (it misses the last step where we zeroïze dependencies of group in the BLOCKED queue at the end)
Updated by François ARMAND over 6 years ago
Work in progess here: https://github.com/fanf/rudder/commit/61c5af46ec0842e832a29c7247178f7f3ff1e5f2
Updated by François ARMAND over 6 years ago
Work in progess here: https://github.com/fanf/rudder/commit/f12ddd4f751d67f1d9abdf6d5413c9bcd20f05d6
Updated by François ARMAND over 6 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/1882
Updated by François ARMAND over 6 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|c26ba5cf2bce52d443e41a1cc0d1865685724355.
Updated by François ARMAND over 6 years ago
- Related to User story #6982: Group of groups: let a group contains nodes from an other group added
Updated by François ARMAND over 6 years ago
- Related to Bug #12338: "Error when trying to find dependencies for that group" when accepting a node added
Updated by Vincent MEMBRÉ over 6 years ago
- Status changed from Pending release to Released
- Priority changed from 69 to 68
This bug has been fixed in Rudder 4.3.0~rc2 which was released today.
- 4.3.0~rc2: Announce Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/