Project

General

Profile

Actions

Bug #3689

closed

The Rudder variables in directive values only work with full value

Added by Nicolas CHARLES over 9 years ago. Updated over 9 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Regression:

Description

The rudder variables ${rudder.(.*).(.*)} only work when the complete value of the variable is this rudder variable
It is not possible to do "datacenter-${rudder.param.datacenter1}", which is a bit of a shame
It's true for all variables:
  1. node variable (2.4)
  2. rule variable (2.4)
  3. param variable (2.7)
Actions #1

Updated by Nicolas CHARLES over 9 years ago

  • Assignee set to François ARMAND

Francois, i'll need some help from you, to know what's the best way to implement the fix ...

Actions #2

Updated by François ARMAND over 9 years ago

Well, I believe there is two completly different topic here:

- parameter and node parametrization (ie: ${rudder.param.XXX} and ${rudder.node.XXXX}) : parametrization binding does not change the cardinality of parametrized variable (ie: if a variable has 3 values with one containing ${rudder.node.id}, then after binding, it still has 3 values, one changed)
- rule parametrization: binding can change (and actually do change, has we are using it almost exclusively to get the list of hostname on which is applied the "hasPolicyServer" rule). That case is hard (what about a variable containing two such parametrization ? How do you specify if you want the full combination space (ie [a,b] & [1,2] => [ [a,1], [a,2], [b,1], [b.2]]), or a sequential walk ([a,1], [b,2]). On which order is the walk is that case ? Etc etc).

So, I think we don't want to expose the second case to user for now, and perhaps we have to think back about how to manage it - I'm not really sur it's "paramtrization" has in "replace that ${} by a value", but more a kind of magic API call that give back a SET of values, and the number of such API call is clearly defined. On the other hand, if we want to expose inventories parameter in ${}, we will have to manage multivalued parametrization.

All in all, implementing the first case will be mostly trivial in 2.7 (not before, because of the refactoring work in deployment service done at that point). The second point need more thinking.

Actions #3

Updated by François ARMAND over 9 years ago

Here, we only change node Id parameter. Rule parameter are managed in #3716

Actions #4

Updated by François ARMAND over 9 years ago

  • Status changed from New to Pending technical review
  • Pull Request set to https://github.com/Normation/rudder/pull/251
Actions #5

Updated by François ARMAND over 9 years ago

  • Assignee changed from François ARMAND to Nicolas CHARLES
Actions #6

Updated by François ARMAND over 9 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #8

Updated by Nicolas PERRON over 9 years ago

  • Status changed from Pending release to Released
Actions #9

Updated by Nicolas PERRON over 9 years ago

This bug has been fixed in Rudder 2.4.7, which was released today.
Check out:

Actions

Also available in: Atom PDF