Bug #17324
closedGroup properties inheritance error when it should not
Description
I have the following case of group and properties
p1: dns=1.1.1.1 p2: dns=9.9.9.9 | \ / | | p3: p1 then p2 | | / p4 / \______ _____ / \ / node dns= ????
Here, p3 defines an order between p1 and p2: since p2 is in the second criterium, its values override the ones in p1, so dns=9.9.9.9 on node.
But current implementation believes that dns belongs to two diferents hierarchy. If p3 is under p4 and p2, everything is fine.
Actually, the priorization in p3 is the same as adding an edge from p2 to p2, and we must look for the (a) topological sorting of the graphe, after checking that it is acyclic.
So, the real algo should look like:
- for all groups containing the node, build graph with all relation: subset + priorization from groups with multiple criterium,
- partition on connected graphes,
- for each of them, check that there's no cycle,
- topoligacly sort them (this is also the complete inheritance list)
- for each list of sorted vertice, add at head position the global properties, in last position the node properties, compute override
- check if two properties appear in two lists with different values => error
Updated by François ARMAND over 4 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/2947
Updated by François ARMAND over 4 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|21628caa3d6a7399624191e9e2203ec9440559c0.
Updated by Vincent MEMBRÉ over 4 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 6.1.0~beta3 which was released today.