Project

General

Profile

Actions

Bug #12674

closed

Policies regeneration error when using a parameters with " char

Added by Vincent DAVY over 6 years ago. Updated over 6 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

If I create a parameter (in menu "Configuration policy > Parameters") with a value containing a " char, and then I use the parameter in a directive, I got a policies regeneration error.
Here is a sample :

Policy update error for process '197' at 2018-05-22 10:12:35 <- Cannot write configuration node <- Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check'.
 stdout:    error: There are syntax errors in policy files

 stderr: '/var/rudder/share/fae5f18c-a543-4ed2-9a74-0a8991017bbf/rules.new/cfengine-community/common/1.0/rudder-parameters.cf:42:27: error: syntax error
   "test" string => "'"toto"'";
                          ^
/var/rudder/share/fae5f18c-a543-4ed2-9a74-0a8991017bbf/rules.new/cfengine-community/common/1.0/rudder-parameters.cf:42:27: error: Check previous line, Expected ',', got 'toto'
   "test" string => "'"toto"'";
                          ^
/var/rudder/share/fae5f18c-a543-4ed2-9a74-0a8991017bbf/rules.new/cfengine-community/common/1.0/rudder-parameters.cf:42:30: error: Expected promiser string, got '"'"'
   "test" string => "'"toto"'";

The global log is attached to this report.

I got the error after a upgrade from 4.3.0 rc to 4.3.1 installed through debian packages.

Seems to be a bit equivalent to this : https://www.rudder-project.org/redmine/issues/12101


Files

error.txt (28 KB) error.txt Vincent DAVY, 2018-05-22 09:19

Subtasks 1 (0 open1 closed)

Bug #12679: Add a test for escaped " in promise writerReleasedFrançois ARMANDActions

Related issues 2 (0 open2 closed)

Related to Rudder - Bug #12101: Escaping issue in Users Technique ParameterReleasedFrançois ARMANDActions
Related to Rudder - Bug #12390: (breaking change) In Windows Agent, a '\' in a directive parameter value is escaped but it should notReleasedFrançois ARMANDActions
Actions

Also available in: Atom PDF