Project

General

Profile

User story #6733

Allow Node properties to be used in directives and ncf techniques

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

Status:
Released
Priority:
N/A
Assignee:
-
Category:
Web - Config management
Target version:
Pull Request:
Suggestion strength:
User visibility:
Effort required:

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

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

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
#1

Updated by François ARMAND over 5 years ago

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

Updated by Benoît PECCATTE almost 5 years ago

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

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

Updated by François ARMAND over 4 years ago

  • Related to User story #3112: Allow to get informations from the node inventory to use them in Directives and ncf techniques added
#5

Updated by François ARMAND over 4 years ago

  • Has duplicate Bug #6125: We can define key-values on nodes, but we can't use it in the directives added
#6

Updated by Alexis MOUSSET over 4 years ago

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

Updated by Alexis MOUSSET over 4 years ago

  • Status changed from New to In progress
#8

Updated by Alexis MOUSSET over 4 years ago

  • Status changed from In progress to 12
#9

Updated by Alexis MOUSSET over 4 years ago

  • Status changed from 12 to Pending release
#10

Updated by Alexis MOUSSET over 4 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
#11

Updated by Alexis MOUSSET over 4 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.

#12

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

#13

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

#14

Updated by François ARMAND over 4 years ago

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

#15

Updated by François ARMAND over 4 years ago

  • Description updated (diff)
#16

Updated by François ARMAND over 4 years ago

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

Also available in: Atom PDF