Project

General

Profile

Actions

User story #8737

closed

User story #6733: Allow Node properties to be used in directives and ncf techniques

Expose node properties as a global CFEngine data variable

Added by Alexis Mousset over 7 years ago. Updated over 7 years ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Files

properties.json (185 Bytes) properties.json Vincent MEMBRÉ, 2016-07-25 15:18

Subtasks 1 (0 open1 closed)

Bug #8756: Expose node properties in properties.d not propertiesReleasedNicolas CHARLES2016-07-26Actions

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #9087: Error on promises generation when there are no properties filesRejectedActions
Actions #1

Updated by Benoît PECCATTE over 7 years ago

Node specific values will be written in a specific directory and put on the agent.
In this directory, there will be many different JSON files.

Those files will be of the form { "namespace": { "key1": ..., "key2": ...} }
Where namespace can be "properties", "inventory", ...

First, a specific rudder bundle (let's call it property_reader) will read those files in a per file variable.
So property will exist under the form property_reader.myfile[thenamespace][key1]
Let's not document this form at first.

Then, this bundle will translate this content into the "node" namespace (or bundle).
They will then be accessible under the general form node.thenamespace[key1]
This will be the documented way to access them.
This is consistent with the node.env existing namespace.
This translation can only be done using a merging strategy, not defining one is equivalent to :
"for each namespace take the exact content of the last read file that contains it "

Actions #2

Updated by Vincent MEMBRÉ over 7 years ago

Properties are available for each nodes in: <inputs>/properties.d/properties.json

Actions #3

Updated by Benoît PECCATTE over 7 years ago

  • Status changed from New to In progress
  • Assignee set to Benoît PECCATTE
Actions #4

Updated by Vincent MEMBRÉ over 7 years ago

An example of generated file:

{
  "properties":{
    "env_type":"production",
    "shell":"/bin/sh",
    "utf-8 poetry":"ᚠᛇᚻ᛫ᛒᛦᚦ᛫ᚠᚱᚩᚠᚢᚱ᛫ᚠᛁᚱᚪ᛫ᚷᛖᚻᚹᛦᛚᚳᚢᛗ" 
  }
}
Actions #5

Updated by Benoît PECCATTE over 7 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/998
Actions #6

Updated by Benoît PECCATTE over 7 years ago

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

Updated by Alexis Mousset over 7 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 #8

Updated by Nicolas CHARLES over 7 years ago

  • Related to Bug #9087: Error on promises generation when there are no properties files added
Actions

Also available in: Atom PDF