Project

General

Profile

Actions

Bug #4880

closed

The use of escaped string into class_parameter lead to "Unknown state" reports

Added by Nicolas PERRON almost 10 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

Using bundle with parameters containing escaped string lead to "Unknown state" reports. The reason is that Rudder will expect a string with escapement but the returned reports will be an escaped string. Here an exemple:

On server side (techniques/ncf_techniques/test_commands/0.1/expected_reports.csv):

# This file contains one line per report expected by Rudder from this technique
# Format: technique_name;;class_prefix_${key};;@@RUDDER_ID@@;;component name;;component key
test_commands;;command_execution_module_/bin/echo \"Good job\";;@@RUDDER_ID@@;;Command execution;;/bin/echo \"Good job\" 
test_commands;;command_execution_module_/tmp/module_test;;@@RUDDER_ID@@;;Command execution module;;/tmp/module_test

On node side (/var/rudder/cfengine-community/inputs/rudder_expected_reports.csv.res) :

# This file contains one line per report expected by Rudder from this technique
# Format: technique_name;;class_prefix_${key};;@@RUDDER_ID@@;;component name;;component key
test_commands;;command_execution_module__bin_echo__Good_job_;;fc28d3ea-0331-4610-84e4-c9858a561489@@656cf7af-2991-4fb8-abbe-8959baf471c2@@47;;Command execution;;/bin/echo "Good job" 
test_commands;;command_execution_module__tmp_module_test;;fc28d3ea-0331-4610-84e4-c9858a561489@@656cf7af-2991-4fb8-abbe-8959baf471c2@@47;;Command execution module;;/tmp/module_test

The result is in the attached screenshot.

The problem seems to be into the 30_generic_methods/logger_rudder.cf


Files

Strange_Expecting_reports.png (98.2 KB) Strange_Expecting_reports.png Nicolas PERRON, 2014-05-22 12:09

Related issues 1 (0 open1 closed)

Related to Rudder - User story #4873: Add bundle command_execution_module() to execute CFEngine modulesRejectedActions
Actions

Also available in: Atom PDF