Project

General

Profile

User story #2881

Allow user to choose order of Directive application in a Rule

Added by François ARMAND over 8 years ago. Updated over 5 years ago.

Status:
Released
Priority:
1
Category:
Web - Config management
Target version:
Suggestion strength:
User visibility:
Effort required:

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.


Subtasks

Architecture #7043: Make Rudder code use BundleOrder where it's neededReleasedNicolas CHARLES2015-07-29Actions
User story #7049: Port bundle order from cf-clerk to Rudder on branch 3.2ReleasedFrançois ARMAND2015-07-30Actions
Bug #7059: In UI, directives in a rule are not sorted as their bundle orderReleasedNicolas CHARLES2015-07-30Actions

Related issues

Related to Rudder - Bug #11289: Missing documentation on Directive orderingReleasedAlexis MOUSSETActions
#1

Updated by Jonathan CLARKE about 8 years ago

  • Target version changed from 24 to Ideas (not version specific)
#2

Updated by François ARMAND over 5 years ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
  • Priority changed from N/A to 1
  • 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.

#3

Updated by François ARMAND over 5 years ago

Some precision about the sort: it would be the common sort on String, with:

- case unsensitive
- "" comes first (lowest value).

#4

Updated by François ARMAND over 5 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
#5

Updated by François ARMAND over 5 years ago

  • Status changed from Pending technical review to Pending release
#7

Updated by Anonymous over 5 years ago

  • % Done changed from 50 to 100
#8

Updated by François ARMAND over 5 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.1.1 which was released today.

#9

Updated by Nicolas CHARLES over 3 years ago

  • Related to Bug #11289: Missing documentation on Directive ordering added

Also available in: Atom PDF