Project

General

Profile

Bug #11445

Node properties syntax is not the same for Windows agent

Added by François ARMAND 7 months ago. Updated 4 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Config management
Target version:
Target version (plugin):
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
68

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.

IMG_20171017_121851.jpg (102 KB) IMG_20171017_121851.jpg François ARMAND, 2017-10-18 10:10

Related issues

Related to Rudder - User story #11749: Add logic to generate ncf Technique files into RudderReleased

Associated revisions

Revision 596d3e23 (diff)
Added by Vincent MEMBRÉ 5 months ago

Fixes #11445: Node properties syntax is not the same for Windows agent

Revision e6e9b231 (diff)
Added by Vincent MEMBRÉ 5 months ago

Fixes #11445: Node properties syntax is not the same for Windows agent

History

#1 Updated by Alexis MOUSSET 7 months 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

#2 Updated by Benoît PECCATTE 6 months 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

#3 Updated by François ARMAND 6 months ago

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).

#4 Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 4.2.1 to 4.2.2

#5 Updated by Benoît PECCATTE 6 months ago

  • Assignee set to François ARMAND
  • Priority changed from 70 to 69

#6 Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 4.2.2 to 4.2.3

#7 Updated by Vincent MEMBRÉ 5 months ago

  • Status changed from New to In progress
  • Assignee changed from François ARMAND to Vincent MEMBRÉ

#9 Updated by Vincent MEMBRÉ 5 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to François ARMAND

#13 Updated by Vincent MEMBRÉ 5 months ago

  • Related to User story #11749: Add logic to generate ncf Technique files into Rudder added

#15 Updated by Vincent MEMBRÉ 5 months ago

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

#16 Updated by Vincent MEMBRÉ 5 months ago

  • Status changed from Pending technical review to Pending release

#17 Updated by Vincent MEMBRÉ 4 months 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.

Also available in: Atom PDF