Actions
Bug #23240
closedWindows technique generated function name is incoherent with the generated directives
Status:
Released
Priority:
1 (highest)
Assignee:
Category:
rudderc
Target version:
Pull Request:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
I hate Rudder for that
User visibility:
First impressions of Rudder
Effort required:
Very Small
Priority:
179
Name check:
To do
Fix check:
To do
Regression:
No
Description
Since 8.0 the generation process produces for a windows technique named "Test windows":
- a technique folder named "test_windows"
- the technique.ps1 file as a powershell function named "Test-Windows"
- the directives calling this technique try to call a "TestWindows" function
It results in errors like such in the agent and no reports:
PS C:\Program Files\Rudder\policy> rudder agent run Rudder agent 7.3.5.1901893715 Node uuid: 458a5afc-1171-4464-aa63-16bdf34ea696 Start execution with config [20230809-084248-a53f2fbb] Mode State Technique Component Key Message Enforce control Common start 20230809-084248-a53f2fbb Start execution Enforce result_success dsc-common Reporting configuration NXLog File C:\Program Files (x86)\nxlog\conf\nxlog.conf does not exists Enforce result_na dsc-common Service status nxlog Not applicable Enforce result_success dsc-common System variables data Defined Rudder properties, inventory variables and parameters. Enforce result_success dsc-common Agent tasks Rudder-Agent The Rudder-Agent task was already correctly setup. Enforce result_success dsc-common Agent tasks Rudder-Inventory The Rudder-Inventory task was already correctly setup. Enforce result_success dsc-common Log system for reports None All reports were successfully sent Enforce result_success dsc-common Prerun check $env:PATH Rudder presence in $env:PATH was correct TestWindows : The term 'TestWindows' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Program Files\Rudder\policy\rudder-directives.ps1:27 char:3 + TestWindows -ReportId '0bfbf8af-89dc-4c67-805a-07c9c416aed0@@b8fdad ... + ~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (TestWindows:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Enforce control Common end 20230809-084248-a53f2fbb End execution ## Summary ##################################################################### execution time: 0.98s ################################################################################I feel like there are 2 issues here:
- the generation process is incoherent in its naming
- the agent should catch such errors at the directive level
Updated by Alexis Mousset over 1 year ago
- Status changed from New to In progress
- Assignee set to Alexis Mousset
Updated by Alexis Mousset over 1 year ago
- Status changed from In progress to Pending technical review
- Assignee changed from Alexis Mousset to Félix DALLIDET
- Pull Request set to https://github.com/Normation/rudder/pull/4967
Updated by Alexis Mousset over 1 year ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|e9b9483cbf52a4f21435d7ddccef55d74a95f652.
Updated by Vincent MEMBRÉ about 1 year ago
- Priority changed from 100 to 200
This bug has been fixed in Rudder 8.0.0~beta1 which was released today.
Updated by Vincent MEMBRÉ 8 months ago
- Subtask deleted (
#23241) - Priority changed from 200 to 179
Updated by Vincent MEMBRÉ 8 months ago
- Related to Bug #23241: Windows directives should catch exception at runtime added
Updated by Vincent MEMBRÉ 8 months ago
- Status changed from Pending release to Released
Actions