Project

General

Profile

Bug #12060

Incomplete "Rules to be applied" summary when accepting a new nodes when using groups of groups

Added by Nicolas CHARLES 10 months ago. Updated 8 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Config management
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
68
Tags:

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

IMG_20180328_160533.jpg (498 KB) IMG_20180328_160533.jpg François ARMAND, 2018-03-28 16:08
1331

Related issues

Related to Rudder - User story #6982: Group of groups: let a group contains nodes from an other groupReleased
Related to Rudder - Bug #12338: "Error when trying to find dependencies for that group" when accepting a nodeReleased

Associated revisions

Revision c26ba5cf (diff)
Added by François ARMAND 9 months ago

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

Revision dff95c1c (diff)
Added by François ARMAND 9 months ago

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

History

#1 Updated by François ARMAND 10 months ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND

#2 Updated by Vincent MEMBRÉ 10 months ago

  • Target version changed from 4.3.0~beta1 to 4.3.0~rc1

#3 Updated by Benoît PECCATTE 10 months 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

#4 Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 4.3.0~rc1 to 4.3.0~rc2
  • Priority changed from 70 to 69

#5 Updated by François ARMAND 9 months ago

  • Tags set to Blocking 4.3

#6 Updated by François ARMAND 9 months ago

1331

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)

#9 Updated by François ARMAND 9 months 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

#10 Updated by François ARMAND 8 months ago

  • Status changed from Pending technical review to Pending release

#11 Updated by François ARMAND 8 months ago

  • Related to User story #6982: Group of groups: let a group contains nodes from an other group added

#12 Updated by François ARMAND 8 months ago

  • Related to Bug #12338: "Error when trying to find dependencies for that group" when accepting a node added

#13 Updated by Vincent MEMBRÉ 8 months 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.

Also available in: Atom PDF