Project

General

Profile

Actions

Bug #11445

closed

Node properties syntax is not the same for Windows agent

Added by François ARMAND over 6 years ago. Updated over 6 years ago.

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

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

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

Related issues 1 (0 open1 closed)

Related to Rudder - User story #11749: Add logic to generate ncf Technique files into RudderReleasedFrançois ARMANDActions
Actions #1

Updated by Alexis Mousset over 6 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
Actions #2

Updated by Benoît PECCATTE over 6 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
Actions #3

Updated by François ARMAND over 6 years 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).

Actions #4

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.2.1 to 4.2.2
Actions #5

Updated by Benoît PECCATTE over 6 years ago

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

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.2.2 to 4.2.3
Actions #7

Updated by Vincent MEMBRÉ over 6 years ago

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

Updated by Vincent MEMBRÉ over 6 years ago

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

Updated by Vincent MEMBRÉ over 6 years ago

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

Updated by Vincent MEMBRÉ over 6 years ago

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

Updated by Vincent MEMBRÉ over 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #17

Updated by Vincent MEMBRÉ over 6 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.

Actions

Also available in: Atom PDF