Project

General

Profile

Actions

User story #6733

closed

Allow Node properties to be used in directives and ncf techniques

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

Status:
Released
Priority:
N/A
Assignee:
-
Category:
Web - Config management
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

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


Subtasks 4 (0 open4 closed)

User story #8720: Generate a json file containing node properties for each nodeReleasedFrançois ARMAND2016-07-20Actions
User story #8737: Expose node properties as a global CFEngine data variableReleasedNicolas CHARLES2016-07-26Actions
Bug #8756: Expose node properties in properties.d not propertiesReleasedNicolas CHARLES2016-07-26Actions
User story #8755: Document node propertiesReleasedJonathan CLARKE2016-07-26Actions

Related issues 4 (0 open4 closed)

Related to Rudder - User story #5506: Customize Nodes by adding attribute on themReleasedFrançois ARMAND2014-11-27Actions
Related to Rudder - User story #3112: Allow to get informations from the node inventory to use them in Directives and ncf techniquesReleasedFrançois ARMANDActions
Related to Rudder - User story #4054: Special cfengine variables vs. special Rudder variablesRejected2013-10-11Actions
Has duplicate Rudder - Bug #6125: We can define key-values on nodes, but we can't use it in the directivesRejectedFrançois ARMAND2015-01-14Actions
Actions #1

Updated by François ARMAND over 9 years ago

  • Related to User story #5506: Customize Nodes by adding attribute on them added
Actions #2

Updated by Benoît PECCATTE over 8 years ago

  • Category set to Web - Config management
  • Target version set to Ideas (not version specific)
Actions #3

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)
Actions #4

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
Actions #5

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
Actions #6

Updated by Alexis Mousset over 8 years ago

  • Target version changed from Ideas (not version specific) to 3.1.12
Actions #7

Updated by Alexis Mousset over 8 years ago

  • Status changed from New to In progress
Actions #8

Updated by Alexis Mousset over 8 years ago

  • Status changed from In progress to 12
Actions #9

Updated by Alexis Mousset over 8 years ago

  • Status changed from 12 to Pending release
Actions #10

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
Actions #11

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.

Actions #12

Updated by François ARMAND about 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).

Actions #13

Updated by Benoît PECCATTE about 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.

Actions #14

Updated by François ARMAND about 8 years ago

For other comments on the directive part, please use: http://www.rudder-project.org/redmine/issues/9057

Actions #15

Updated by François ARMAND about 8 years ago

  • Description updated (diff)
Actions #16

Updated by François ARMAND about 8 years ago

  • Related to User story #4054: Special cfengine variables vs. special Rudder variables added
Actions

Also available in: Atom PDF