Project

General

Profile

Actions

User story #5225

closed

Allow to use environment variable from node inventory in directive rudder variables

User story #5225: Allow to use environment variable from node inventory in directive rudder variables

Added by François ARMAND over 11 years ago. Updated almost 11 years ago.

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

Description

In a directive, we are allowed to use rudder parametrized variable, see: http://www.rudder-project.org/foswiki/Development/ContextedVariables

We want to be able to access environment variable value from the node inventory as such variable, with the following semantic:

${rudder.node.env.SOME_VARIABLE} is replaced by:

- "" is the variable does not exist or is empty
- the value of SOME_VARIABLE, considered as a string, as reported in the inventory in the <VAL> tag for the <KEY>SOME_VARIABLE</KEY> tag of an <ENVS>.

For posterity: this ticket was implemented and removed during 3.0 cycle in favor of #5449. A more generic solution will be implemented in #3112


Subtasks 3 (0 open3 closed)

User story #5236: Add a bulk load for NodeInventory informationReleasedNicolas CHARLESActions
Bug #5801: Remove ${rudder.node.env.SOME_VARIABLE} parameterReleasedNicolas CHARLESActions
Bug #5831: Remove tests on node.envReleasedFrançois ARMANDActions

Related issues 3 (0 open3 closed)

Related to Rudder - User story #5278: Document allowed ${rudder.variable} in directive formResolvedActions
Related to Rudder - User story #5449: Make environment variables accessible as parameter in all TechniquesReleasedActions
Related to Rudder - User story #3112: Allow to get informations from the node inventory to use them in Directives and ncf techniquesReleasedFrançois ARMANDActions

Updated by François ARMAND over 11 years ago Actions #1

  • Pull Request set to https://github.com/Normation/rudder/pull/572

The pull request with all the logic & unit tests is here: https://github.com/Normation/rudder/pull/572

I would like to test what happens when a lot of nodes exists before merging that.

Updated by François ARMAND over 11 years ago Actions #2

  • Status changed from In progress to 10

The tests show that the performances are very lightly impacted by that addition, also meaning that adding any other inventory information is mostly free.

Updated by François ARMAND over 11 years ago Actions #3

Functionnal review agreed on the following points:

- syntax: ${rudder.node.env.ENVIRONMENT_VARIABLE_NAME},
- replaced by the value of the environment variable "ENVIRONMENT_VARIABLE_NAME",
- case sensitive,
- as known in the last inventory for the node,
- or "" if there is no variable with that name for that node

We now need to add information about allowed parameters in the directive screen, see: #5278

Updated by François ARMAND over 11 years ago Actions #4

  • Status changed from 10 to Pending technical review
  • Assignee changed from François ARMAND to Nicolas CHARLES

Ready for technical review.

Updated by François ARMAND over 11 years ago Actions #5

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

Updated by François ARMAND over 11 years ago Actions #7

It is to be noted that that feature does not impact the NodeConfigurationCache logic because variable interpolation is done BEFORE the cache check.

Updated by Matthieu CERDA about 11 years ago Actions #8

  • Target version changed from 140 to 3.0.0~beta1

Updated by Vincent MEMBRÉ almost 11 years ago Actions #9

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.0.0~beta1 which was release on 01/12/2014.

Updated by François ARMAND almost 11 years ago Actions #10

  • Tracker changed from Enhancement to User story
  • Parent task deleted (#3112)

Updated by François ARMAND almost 11 years ago Actions #11

  • Description updated (diff)

Updated by François ARMAND almost 11 years ago Actions #12

  • Description updated (diff)
Actions

Also available in: PDF Atom