Bug #14371
closedAt least on windows, technique editor parameters can not handle "_" char
Description
When defining a ncf technique for dsc with a parameter named "kb_path", it creates a parameter named "KbPath" in the dsc technique, but the call to generic methods using the parameter use "${kb_path} instead of "${KbPath}".
WORKAROUND: As for now, please don't use "_" in parameter names in windows techniques created with the editor.
Updated by François ARMAND over 5 years ago
- Target version changed from 5.0.7 to 5.0.9
Updated by François ARMAND over 5 years ago
- Severity set to Major - prevents use of part of Rudder | no simple workaround
- User visibility set to Getting started - demo | first install | Technique editor and level 1 Techniques
- Priority changed from 0 to 102
Updated by François ARMAND over 5 years ago
- Assignee set to Vincent MEMBRÉ
We may have forgot an escape somewhere.
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 5.0.9 to 5.0.10
- Priority changed from 102 to 101
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 5.0.10 to 5.0.11
- Priority changed from 101 to 99
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 5.0.11 to 5.0.12
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 5.0.12 to 5.0.13
- Priority changed from 99 to 97
Updated by Vincent MEMBRÉ about 5 years ago
- Target version changed from 5.0.13 to 5.0.14
- Priority changed from 97 to 94
Updated by François ARMAND about 5 years ago
- Effort required set to Small
- Priority changed from 94 to 107
Updated by Vincent MEMBRÉ about 5 years ago
- Target version changed from 5.0.14 to 5.0.15
- Priority changed from 107 to 106
Updated by Vincent MEMBRÉ almost 5 years ago
- Target version changed from 5.0.15 to 5.0.16
- Priority changed from 106 to 102
Updated by Alexis Mousset over 4 years ago
- Target version changed from 5.0.16 to 5.0.17
- Priority changed from 102 to 98
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.17 to 5.0.18
Updated by Félix DALLIDET over 4 years ago
- Related to Bug #17846: Directive parameters are not passed to DSC Agent command_execution when it contains an underscore _ added
Updated by François ARMAND over 4 years ago
- Assignee changed from Vincent MEMBRÉ to Félix DALLIDET
1/ we need to find back what are the exact rules for authorized chars in what kind of names
=> either find original commit or relevant documentation/test
(MS: doc: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_variables?view=powershell-7)
2/ adapt the rules to keep working cases working, and handle the news ones.
Step 1: Felix, can you document what cases of "_" are foriden
Updated by Nicolas CHARLES over 4 years ago
- Related to Bug #14372: Ncf techniques used in windows can not start with a numerical char added
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.18 to 5.0.19
Updated by Vincent MEMBRÉ about 4 years ago
- Target version changed from 5.0.19 to 5.0.20
Updated by Vincent MEMBRÉ about 4 years ago
- Target version changed from 5.0.20 to 797
Updated by Benoît PECCATTE over 3 years ago
- Target version changed from 797 to 6.1.14
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.14 to 6.1.15
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.15 to 6.1.16
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 6.1.16 to 6.1.17
Updated by Vincent MEMBRÉ almost 3 years ago
- Target version changed from 6.1.17 to 6.1.18
Updated by Vincent MEMBRÉ almost 3 years ago
- Target version changed from 6.1.18 to 6.1.19
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.1.19 to 6.1.20
- Priority changed from 98 to 100
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.1.20 to 6.1.21
- Priority changed from 100 to 101
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.1.21 to old 6.1 issues to relocate
- Priority changed from 101 to 74
Updated by Félix DALLIDET about 2 years ago
- Effort required changed from Small to Very Small
- Priority changed from 74 to 0
- Regression set to No
The issue here is not powershell based. It comes from the policy generation process:
- Given a "server_stuff" parameter, I end up with the following technique:
function Badaboum { [CmdletBinding()] param ( [parameter(Mandatory=$true)] [string]$reportId, [parameter(Mandatory=$true)] [string]$techniqueName, [parameter(Mandatory=$true)] [string]$ServerStuff, [Rudder.PolicyMode]$policyMode ) BeginTechniqueCall -Name $techniqueName $reportIdBase = $reportId.Substring(0,$reportId.Length-1) $localContext = [Rudder.Context]::new($techniqueName) $localContext.Merge($system_classes) $resources_dir = $PSScriptRoot + "\resources" $reportId=$reportIdBase+"58c380a3-3e54-4b39-bcf5-783340fa1793" $componentKey = "Write-Host `"${server_stuff}`"" $reportParams = @{ ClassPrefix = ([Rudder.Condition]::canonify(("command_execution_" + $componentKey))) ComponentKey = $componentKey ComponentName = "Command execution" PolicyMode = $policyMode ReportId = $reportId DisableReporting = $false TechniqueName = $techniqueName } $call = Command-Execution -Command "Write-Host `"${server_stuff}`"" -PolicyMode $policyMode $methodContext = Compute-Method-Call @reportParams -MethodCall $call $localContext.merge($methodContext) EndTechniqueCall -Name $techniqueName }
Which is false as the parameter of the technique is chnaged to "ServerStuff" instead of "server_stuff". It also needs to be changed in the directive.ps1 generated file.
Updated by Vincent MEMBRÉ almost 2 years ago
- Target version changed from old 6.1 issues to relocate to 7.1.8
Updated by Vincent MEMBRÉ almost 2 years ago
- UX impact set to I hate Rudder for that
- Priority changed from 0 to 160
Updated by Vincent MEMBRÉ almost 2 years ago
- Status changed from New to In progress
- Assignee changed from Félix DALLIDET to Vincent MEMBRÉ
Updated by Vincent MEMBRÉ almost 2 years 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/4563
Updated by Vincent MEMBRÉ almost 2 years ago
- Assignee changed from François ARMAND to Félix DALLIDET
Updated by Vincent MEMBRÉ almost 2 years ago
- Status changed from Pending technical review to Pending release
- Priority changed from 160 to 161
Applied in changeset rudder|c2c7ec2f056edf734c902b7ac0d073232198ae0a.
Updated by Vincent MEMBRÉ almost 2 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 7.1.8 and 7.2.2 which were released today.