User story #3112
closedAllow to get informations from the node inventory to use them in Directives and ncf techniques
Description
We should be able to use the informations from the inventories in the Directives. This is not the case now, then we have no way to make a symlink from /usr/src/linux to /usr/src/linux-number-of-kernel, for example.
In the inventory, we have informations like:- Hostname
- OS name, version, SP
- ips
- RAM Memory
- Kernel Version
- policy server id
- local administrator name
- architecture description
- timezone
They be made available in JSON, and used with variable ${node.inventory}, like ${node.inventory[os][name]}
Issue is: how do we differentiate all ips (we have simply a list)
Updated by Nicolas PERRON almost 12 years ago
- Target version changed from 2.5.0~beta1 to 2.5.0~rc1
Updated by François ARMAND almost 12 years ago
- Target version changed from 2.5.0~rc1 to 2.6.0~beta1
Updated by Nicolas PERRON over 11 years ago
- Target version changed from 2.6.0~beta1 to 2.6.0~rc1
Updated by Matthieu CERDA over 11 years ago
- Target version changed from 2.6.0~rc1 to 2.6.0
Updated by Jonathan CLARKE over 11 years ago
- Target version changed from 2.6.0 to 2.6.1
Updated by Nicolas PERRON over 11 years ago
- Target version changed from 2.6.1 to 2.6.2
Updated by Nicolas PERRON over 11 years ago
- Target version changed from 2.6.2 to 2.6.3
Updated by Nicolas PERRON over 11 years ago
- Status changed from New to 8
- Target version changed from 2.6.3 to Ideas (not version specific)
Updated by François ARMAND over 10 years ago
- Assignee set to François ARMAND
- Target version changed from Ideas (not version specific) to 140
This is more and more a necessity.
For now, we have access to these information:
- rudder.node.id
- rudder.node.hostname
- rudder.node.admin
- rudder.node.policyserver.id
- rudder.node.policyserver.hostname
- rudder.node.policyserver.admin
Taking an iterative approach, the first step will be to get the environment variable from the enventory.
Then, the logic should be extended to ANY inventory property, following the nomenclature from what is returned by the API when asked for node details.
Question will have to be asked about how we handle multivalued or compound field in an homogeneous and systematic way. For example, we could adopt a JSON like structure.
Updated by Matthieu CERDA about 10 years ago
- Target version changed from 140 to 3.0.0~beta1
Updated by Jonathan CLARKE almost 10 years ago
- Target version changed from 3.0.0~beta1 to 3.1.0~beta1
Updated by François ARMAND almost 10 years ago
- Subject changed from We should have methods to get informations from the node inventory to use them in the Directives to Allow to get informations from the node inventory to use them in Directives
Updated by Benoît PECCATTE over 9 years ago
- Category changed from 14 to Web - Config management
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 3.1.0~beta1 to 3.1.0~rc1
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 3.1.0~rc1 to 3.1.0
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 3.1.0 to 3.1.1
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 3.1.1 to 3.1.2
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 3.1.2 to 3.1.3
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 3.1.3 to 3.1.4
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 3.1.4 to 3.1.5
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 3.1.5 to 3.1.6
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 3.1.6 to 3.1.7
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.1.7 to 3.1.8
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.1.8 to 3.1.9
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.1.9 to 3.1.10
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.1.10 to 3.1.11
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.1.11 to 3.1.12
Updated by François ARMAND over 8 years ago
- Related to User story #6733: Allow Node properties to be used in directives and ncf techniques added
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.1.12 to 3.1.13
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.13 to 3.1.14
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.14 to 3.1.15
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.15 to 3.1.16
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.16 to 3.1.17
Updated by François ARMAND about 8 years ago
- Related to User story #8022: Allow users to specify node hostname (FQDN) added
Updated by François ARMAND about 8 years ago
- Related to User story #4054: Special cfengine variables vs. special Rudder variables added
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.17 to 3.1.18
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.18 to 3.1.19
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.19 to 3.1.20
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.20 to 3.1.21
Updated by François ARMAND over 7 years ago
- Related to Question #10450: Use node inventory data in directives? With substring syntax? added
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.21 to 3.1.22
Updated by François ARMAND over 7 years ago
- Related to User story #4670: Allows inventories to be augmented by the user with custom properties added
Updated by François ARMAND over 7 years ago
Devlopper note: there is twi hard problems,
1/ semantic to describe access to inventory values (it could be linked to #9299 if we actually model all inventory information has json path, and we will need to do that to let the user know what to query)
2/ performance and consistency
For this one, the problem is to load the correct "context" for the node in an atomic way (i.e in a way that the node context matches the directive for the same generation trigger).
To be clearer, today we have a very simple "atomic" way of doing that thing: at start of generation, we load all datas (rules, groupes, directives, parameters, and node properties) and we only rely on these loaded, immutable data for the remaining of the process.
Now, if we want to do the same with inventories, we are going to load FAR TO MUCH data, and the performance will be horrible.
So we need to somehow know before loading node information, for all node, the bounding context (aka the list of free variable for that node's applied directives), and only query for that (open question: node by node, or for all node ? Depends on node by node generation ?).
So we need to change our model, to have for each node the list of its free variable. But we can't have that today before quite far in the generation process, and we are bounding them with the node context in the same step (not clever). Quite a big change to forsee.
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.22 to 3.1.23
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 3.1.23 to 3.1.24
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 3.1.24 to 3.1.25
Updated by Benoît PECCATTE about 7 years ago
- Target version changed from 3.1.25 to 4.1.9
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 4.1.9 to 4.1.10
Updated by François ARMAND almost 7 years ago
- Target version changed from 4.1.10 to Ideas (not version specific)
Updated by François ARMAND almost 7 years ago
- Assignee deleted (
François ARMAND)
Updated by Alexis Mousset about 6 years ago
- Related to Bug #13671: Missing node state variable expansion in directive added
Updated by Nicolas CHARLES over 5 years ago
- Subject changed from Allow to get informations from the node inventory to use them in Directives to Allow to get informations from the node inventory to use them in Directives and ncf techniques
- Description updated (diff)
- Target version changed from Ideas (not version specific) to 5.0.13
Updated by Nicolas CHARLES over 5 years ago
- Status changed from New to In progress
- Assignee set to Nicolas CHARLES
Updated by Nicolas CHARLES over 5 years ago
It generates a JSON
{ "hostname":"server.rudder.local", "policyServerId":"root", "localAdministratorAccountName":"root", "archDescription":"x86_64", "ram":"1572864000", "timezone":"Europe/Paris", "os":{ "name":"Debian", "fullName":"Debian GNU/Linux 9.1 (stretch)", "version":"9.1", "kernelVersion":"4.9.0-3-amd64", "servicePack":"" }, "machine":{ "machineType":"VirtualMachineType(VirtualBox)", "manufacturer":"innotek GmbH" } }
in Rudder System Variable RUDDER_INVENTORY_VARS
Updated by Nicolas CHARLES over 5 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to François ARMAND
- Pull Request set to https://github.com/Normation/rudder/pull/2374
Updated by Nicolas CHARLES over 5 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|7345ede620e88596a77867d810057be70c61c165.
Updated by Alexis Mousset about 5 years ago
- Name check changed from To do to Reviewed
Updated by Vincent MEMBRÉ about 5 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 5.0.13 which was released today.