Actions
Bug #22535
closedMustache template is not capable to render technique parameters on windows nodes
Pull Request:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
I hate Rudder for that
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Small
Priority:
157
Name check:
To do
Fix check:
Checked
Regression:
No
Description
The current windows technique generated by the webapp does not register the technique parameters as a global variable for the technique run, it should.
function Super-Technique-To-Test-Everything { [CmdletBinding()] param ( [parameter(Mandatory=$true)] [string]$reportId, [parameter(Mandatory=$true)] [string]$techniqueName, [parameter(Mandatory=$true)] [string]$one_params, [parameter(Mandatory=$true)] [string]$two_params, [Rudder.PolicyMode]$policyMode ) BeginTechniqueCall -Name $techniqueName ..... EndTechniqueCall -Name $techniqueName }
Should be:
function Super-Technique-To-Test-Everything { [CmdletBinding()] param ( [parameter(Mandatory=$true)] [string]$reportId, [parameter(Mandatory=$true)] [string]$techniqueName, [parameter(Mandatory=$true)] [string]$one_params, [parameter(Mandatory=$true)] [string]$two_params, [Rudder.PolicyMode]$policyMode ) $techniqueParams = @{ "one_params" = $one_params "two_params" = $two_params } BeginTechniqueCall -Name $techniqueName -Parameters $techniqueParams ..... EndTechniqueCall -Name $techniqueName
Where BeginTechniqueCall will have an additional code looking like this:
Add-PolicyRudderVar -Name $techniqueName -Value $techniqueParams
The Add-PolicyRudderVar is named Rudder-Var in 7.3+ and is present in the agent modules. But for 7.2 compatibility we will most likely have to backport it in ncf.
Updated by Vincent MEMBRÉ about 1 year ago
- Project changed from 78 to Rudder
- Category changed from Techniques to Techniques
- Target version changed from 7.2-next to 7.2.6
Updated by Vincent MEMBRÉ about 1 year ago
- Status changed from New to In progress
- Assignee set to Vincent MEMBRÉ
Updated by Vincent MEMBRÉ about 1 year ago
- Status changed from In progress to Pending technical review
- Assignee changed from Vincent MEMBRÉ to François ARMAND
- Pull Request set to https://github.com/Normation/rudder/pull/4730
Updated by Vincent MEMBRÉ about 1 year ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|5f15d1f101f11911dd89ab59507491fd7f5afd76.
Updated by Félix DALLIDET 12 months ago
- Subject changed from Mustache template is not capable to render technique parameters to Mustache template is not capable to render technique parameters on windows nodes
Updated by Vincent MEMBRÉ 12 months ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 7.2.6 and 7.3.1 which were released today.
Actions