Bug #11445
closedNode properties syntax is not the same for Windows agent
Description
Powershell does not provide a way to bind node properties expression like it is done in CFEngine with the syntaxe ${node.properties[some][access][path]}.
For now, the syntaxe is: $($node.properties["some"]["access"]["path"])
Note the $($ and the double quotes.
This must be corrected, because at it stands, it forbid the possibility to write techniques in the editor which work on both Linux and Windows nodes.
Files
Updated by Alexis Mousset about 7 years ago
- Subject changed from Node properties syntaxe is not the same for Windows agent to Node properties syntax is not the same for Windows agent
Updated by Benoît PECCATTE about 7 years ago
- Severity set to Major - prevents use of part of Rudder | no simple workaround
- User visibility set to Getting started - demo | first install | level 1 Techniques
- Priority changed from 0 to 70
Updated by François ARMAND about 7 years ago
- File IMG_20171017_121851.jpg IMG_20171017_121851.jpg added
So, this one is not trivial, but we have a path towards resolution.
There is 3 kind of files to consider for that:
- 1/ DSC library files => nothing to do, it's not exposed to user and we can use native syntaxe
- 2/ directive parameter => they need to be translated to DSC syntaxe for DSC-agent based nodes
- 3/ technique editor => we need to create the correct call when we generate .cf or .ps1 files.
The real blocker for now is 3/ because for now, we don't analyse at all technique editor parameters and we just output strings.
Some requirments from an architectural point of view:
- we must not write the kind of parsing / analyse at several places ;
- it is a parer/compiler problem, no sed or regex to handle it, please.
So, this is the envision solution for now: See attached
- 1/ create or extend Rudder compiler which is able to recognize ${node.properties[...]} to add a rewrite rule function of the agent kind
- 2/ use it for directive as it is already done in policy generation
- 3/ in Rudder, add a REST endpoint which accepts a technique editor JSON description of a technique and create a .ps1 from it (and so remove the python part doing that today).
- 4/ extends that endpoint to add technique parameter analysis and write the correct output.
- 5/ profit by extending that endpoint to also manage .cf and metadata.xml generation (but that will be an other ticket).
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 4.2.1 to 4.2.2
Updated by Benoît PECCATTE about 7 years ago
- Assignee set to François ARMAND
- Priority changed from 70 to 69
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 4.2.2 to 4.2.3
Updated by Vincent MEMBRÉ about 7 years ago
- Status changed from New to In progress
- Assignee changed from François ARMAND to Vincent MEMBRÉ
Updated by Vincent MEMBRÉ about 7 years ago
Work in progess here: https://github.com/VinceMacBuche/rudder/commit/93b5cae99f75a165091a17d83341e238be46ae79
Updated by Vincent MEMBRÉ about 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Vincent MEMBRÉ to François ARMAND
Updated by Vincent MEMBRÉ about 7 years ago
Work in progess here: https://github.com/VinceMacBuche/rudder/commit/44c679093eaa30c4338848db5ab9c6d28f73742e
Updated by Vincent MEMBRÉ about 7 years ago
Work in progess here: https://github.com/VinceMacBuche/rudder/commit/bbfb6aecc7f2ef8460d5161d03d86053161d2865
Updated by Vincent MEMBRÉ about 7 years ago
Work in progess here: https://github.com/VinceMacBuche/rudder/commit/e6f91edfa3ad110ec61ea427c301a749c4fa3a71
Updated by Vincent MEMBRÉ about 7 years ago
- Related to User story #11749: Add logic to generate ncf Technique files into Rudder added
Updated by Vincent MEMBRÉ about 7 years ago
Work in progess here: https://github.com/VinceMacBuche/rudder/commit/ec9f3973f284f5503a95103c83f7ada6ddd41966
Updated by Vincent MEMBRÉ almost 7 years ago
- Pull Request set to https://github.com/Normation/rudder/pull/1795
Updated by Vincent MEMBRÉ almost 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|596d3e23ffefae1a7791e4e02bb6e987ca4f5141.
Updated by Vincent MEMBRÉ almost 7 years ago
- Status changed from Pending release to Released
- Priority changed from 69 to 68
This bug has been fixed in Rudder 4.2.3 which was released today.
- 4.2.3: Announce Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/