Bug #3689
closedThe Rudder variables in directive values only work with full value
Description
It is not possible to do "datacenter-${rudder.param.datacenter1}", which is a bit of a shame
It's true for all variables:
- node variable (2.4)
- rule variable (2.4)
- param variable (2.7)
Updated by Nicolas CHARLES over 11 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 ...
Updated by François ARMAND over 11 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.
Updated by François ARMAND over 11 years ago
Here, we only change node Id parameter. Rule parameter are managed in #3716
Updated by François ARMAND over 11 years ago
- Status changed from New to Pending technical review
- Pull Request set to https://github.com/Normation/rudder/pull/251
Updated by François ARMAND over 11 years ago
- Assignee changed from François ARMAND to Nicolas CHARLES
Updated by François ARMAND over 11 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset 4d510e7235e7e8289a1ec02bda2e570e0047cf0f.
Updated by Nicolas CHARLES over 11 years ago
Applied in changeset 0adbdae2b0e420f09ec458574a3946f2066767fc.
Updated by Nicolas PERRON over 11 years ago
- Status changed from Pending release to Released
Updated by Nicolas PERRON over 11 years ago
This bug has been fixed in Rudder 2.4.7, which was released today.
Check out:
- The release announcement: http://www.rudder-project.org/pipermail/rudder-announce/2013-July/000041.html
- The full ChangeLog: http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog24
- Download information: http://www.rudder-project.org/foswiki/Download/