User story #2881
closedAllow user to choose order of Directive application in a Rule
Description
As reported by Michael Gliwinski (http://www.rudder-project.org/pipermail/rudder-users/2012-September/000094.html), sometimes, we would like to be able to specify the order of application of Directive in a Rule, because it does matter, even when convergence is taken into account [1]
So, we would like to be able to specify directive order in a rules.
More preciselly, that means being able to specify promise order in the bundlesequence.
Today, that's IMPOSSIBLE2.
A cool and clean solution would be to have a new Rule configuration screen, with one tab for each directive, and the tab order will give the directive orders.
[1], ok, actually if it matters, it must be that in some way, we don't converge, or that we forget some convergence cases. But sometimes, it is WAY easier to convergence to a given goal starting from some point than from other, and being able to specify order would allow that.
[2] because we "merge" directives from the same Technique in only one promise for a given node, for historical reason2, so that:
- given Technique A and B,
- directive A1 and A2 from A, B1 and B2 from B,
- rules R1 having A1 and B1, and R2 having A2 and B2, applied (in fine) to the same node N,
- then the generated bundlesequence for N looks like: bundlesequence(...some promise, A(1+2), ..., B(1+2), ...)
So that we just can't have R1 defining order A1 then B1 and R2 defining order B2 then A2. See #2880 for more details.
Updated by Jonathan CLARKE almost 12 years ago
- Target version changed from 24 to Ideas (not version specific)
Updated by François ARMAND over 9 years ago
- Status changed from New to In progress
- Assignee set to François ARMAND
- Priority changed from N/A to 1 (highest)
- Target version changed from Ideas (not version specific) to 3.1.1
We could have a partial solution that works "most of the time". It would be an enormous advantage, at least for Technique Editor techniques built to deploy things.
So, the solution runs as follow:
- Use the name of the directive as order (so that nothing as to be added on existing directive to be able to sort them),
- system techniques are already sorted first, let it like that,
- sort at best: sort rules and directive (we have a total order here, since name must be differents), and the, sort technique based on the resulting order of directive, non adding duplicates. So a techniques is inserted the first a directive basde on it is encountered.
That mean that some order won't be met, for example:
01. Rule 1
- 01. Directive 1 (Technique 1)
- 02. Directive 2 (Technique 2)
02. Rule 2
- Directive 3 (Technique 3)
03. Rule 3
- 01. Directive 2 (Technique 2)
- 02. Directive 1 (Technique 1)
Resulting order => Technique 1, Technique 2, Technique 3
But things being convergent, that should be ok. There are just now converging MUCH FASTER.
Updated by François ARMAND over 9 years ago
Some precision about the sort: it would be the common sort on String, with:
- case unsensitive
- "" comes first (lowest value).
Updated by François ARMAND over 9 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/cf-clerk/pull/77
Updated by François ARMAND over 9 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset cf-clerk|406d0643e84f3459ff85e8d724bab9413bdaecb7.
Updated by Nicolas CHARLES over 9 years ago
Applied in changeset cf-clerk|e765b95c9a86b3a1d308ee5fd6b9818784cc15c3.
Updated by Anonymous over 9 years ago
- % Done changed from 50 to 100
Applied in changeset rudder|cf028e250129a5f367bcce577bc86a573a5b02e3.
Updated by François ARMAND over 9 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 3.1.1 which was released today.
- Announcement 3.1
- Changelog 3.1
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/
Updated by Nicolas CHARLES over 7 years ago
- Related to Bug #11289: Missing documentation on Directive ordering added