Project

General

Profile

Actions

Bug #23178

closed

" are not correctly escaped in technique for classes_noop in rudder 8.0

Added by Nicolas CHARLES over 1 year ago. Updated about 1 year ago.

Status:
Released
Priority:
N/A
Category:
rudderc
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

With the attached technique, I got the following error at generation

⇨  Cannot write nodes configuration; cause was: Unexpected: Unexpected: Error when executing hooks:
 Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check'. [stdout:][stderr:/var/rudder/share/10583cb6-7a15-4c1a-ade2-52d73b61bf01/rules.new/cfengine-community/bobby/1.0/technique.cf:37:48: error: syntax error
                                         unless => "windows";
<pre>

because generated code is
<pre>
bundle agent call_3a089398_9615_4118_8999_75f6c9abc326(c_name, c_key, report_id, args, class_prefix, command) {

  methods:
    "3a089398-9615-4118-8999-75f6c9abc326_${report_data.directive_id}" usebundle => _method_reporting_context_v4("${c_name}", "${c_key}", "${report_id}");
    "3a089398-9615-4118-8999-75f6c9abc326_${report_data.directive_id}" usebundle => command_execution("${command}"),
                                             if => "windows";
    "3a089398-9615-4118-8999-75f6c9abc326_${report_data.directive_id}" usebundle => _classes_noop(canonify("${class_prefix}_command_execution_echo "# ${boubou}"")),
                                         unless => "windows";
    "3a089398-9615-4118-8999-75f6c9abc326_${report_data.directive_id}" usebundle => log_rudder("Skipping method 'Command execution' with key parameter 'echo "# ${boubou}"' since condition 'windows' is not reached", "echo "# ${boubou}"", canonify("${class_prefix}_command_execution_echo "# ${boubou}""), canonify("${class_prefix}_command_execution_echo "# ${boubou}""), @{args}),
                                         unless => "windows";

}
</pre>


Files

bobby.json (1.05 KB) bobby.json Nicolas CHARLES, 2023-07-31 22:45
Actions #1

Updated by Alexis Mousset over 1 year ago

  • Status changed from New to In progress
  • Assignee set to Alexis Mousset
Actions #2

Updated by Alexis Mousset over 1 year ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis Mousset to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder/pull/4931
Actions #3

Updated by Alexis Mousset over 1 year ago

  • Category changed from Web - Technique editor to rudderc
Actions #4

Updated by Alexis Mousset over 1 year ago

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

Updated by Vincent MEMBRÉ about 1 year ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.0.0~beta1 which was released today.

Actions

Also available in: Atom PDF