User story #6733
closedAllow Node properties to be used in directives and ncf techniques
Description
We added the possibliity to tag nodes with key=value pairs. But for now, these pair can only be used for group. We want to be abble to use them in directive parameters, in ncf techniques, and in cfengine code (Techniques).
We want to have a consistant naming access scheme for all of these location. Something like """node.os.name""", or """node["os"]["name"]""".
We want to have the node properties be real json structure, not only key-value.
We want them to be extensible with external data source (starting with node inventories data)
This ticket is a master ticket that holds reference to each sub part.
Update: documentation for first release is here for directives: http://www.rudder-project.org/doc-3.1/_usage_2.html
And for ncf: http://www.rudder-project.org/doc-3.1/_node_properties.html
Updated by François ARMAND over 9 years ago
- Related to User story #5506: Customize Nodes by adding attribute on them added
Updated by Benoît PECCATTE over 8 years ago
- Category set to Web - Config management
- Target version set to Ideas (not version specific)
Updated by François ARMAND over 8 years ago
- Subject changed from Allows key=value node properties to be used in directives to Allows key=value node properties to be used in directives and ncf techniques and cfengine promise
- Description updated (diff)
Updated by François ARMAND over 8 years ago
- Related to User story #3112: Allow to get informations from the node inventory to use them in Directives and ncf techniques added
Updated by François ARMAND over 8 years ago
- Has duplicate Bug #6125: We can define key-values on nodes, but we can't use it in the directives added
Updated by Alexis Mousset over 8 years ago
- Target version changed from Ideas (not version specific) to 3.1.12
Updated by Alexis Mousset over 8 years ago
- Status changed from New to In progress
Updated by Alexis Mousset over 8 years ago
- Status changed from In progress to 12
Updated by Alexis Mousset over 8 years ago
- Status changed from 12 to Pending release
Updated by Alexis Mousset over 8 years ago
- Subject changed from Allows key=value node properties to be used in directives and ncf techniques and cfengine promise to Allow Node properties to be used in directives and ncf techniques
Updated by Alexis Mousset over 8 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 3.1.12 and 3.2.5 which were released today.
- 3.1: Announce Changelog
- 3.2: Announce Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/
Updated by François ARMAND over 8 years ago
The chosen format, as documented in http://www.rudder-project.org/doc-3.1/_using_properties.html, is the following:
${node.properties[datacenter]}
We must use the same in directive, at least for the data access.
Question: do we want to let the possiblity to have in a directive parameter
${node.properties[datacenter]}to tell "I really want that to be changed at runtime, and not at generation time", and so for node properties that have to be change at generation time, use something like
${rudder.node.properties[datacenter]}?
Personnaly, I don't think it is a good idea, because it's extremelly surprising (vastly different behaviour for almost the same thing). And a work around can certainly be used by calling the full CFEngine variable name (i.e:
${properties.property__var_rudder_cfengine_community_inputs_properties_d_properties_json[properties][datacenter]} - this one won't be changed at generation time).
Updated by Benoît PECCATTE over 8 years ago
I think replace a perfectly regular cfengine variable is also surprising for the user knowing cfengine and knowing how to use it.
A different argument would be that we want to be as much as possible independent of the underlying agent, so things from the user in the interface must be as much as possible processed before being sent to the agent.
Updated by François ARMAND over 8 years ago
For other comments on the directive part, please use: http://www.rudder-project.org/redmine/issues/9057
Updated by François ARMAND about 8 years ago
- Related to User story #4054: Special cfengine variables vs. special Rudder variables added