Project

General

Profile

Actions

Bug #3126

closed

Reports containing CFEngine variable aren't displayed in the WebUI

Bug #3126: Reports containing CFEngine variable aren't displayed in the WebUI

Added by Nicolas PERRON almost 14 years ago. Updated over 11 years ago.

Status:
Released
Priority:
1 (highest)
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

Using a Directive returning special characters like CFEngine variables will lead to have no answer from the node in the Rudder WebUI.

An exemple would be to use the Technique JobScheduler with a command like this:

/bin/echo "This is a test" >> /tmp/my_own_log_on_${sys.host}.log 2>&1

The result will be to have a Rule with a "No Answer" state.


Related issues 2 (0 open — 2 closed)

Blocked by Rudder - Bug #3158: The reporting keys in Rudder are artificially limited to 64 charactersReleasedJonathan CLARKEActions
Blocked by Rudder - Bug #3160: Using \" in component key values leads to invalid reporting valuesReleasedFrançois ARMANDActions

Updated by Nicolas CHARLES almost 14 years ago Actions #1

  • Status changed from New to Discussion
  • Assignee changed from Nicolas CHARLES to Nicolas PERRON

Nicolas, could you show what appears in the technical logs for this directive ?
Are you sure your command line works ? the " should be escaped or the generated promises will be invalid

Updated by Jonathan CLARKE almost 14 years ago Actions #2

It looks like the actual command that is run is used as the component Key in reporting on this Technique. So the logs will contain something along the lines of:

@@jobScheduler@@result_success@@$(job_scheduler_uuids[$(iterator)])@@Job@@/bin/echo "This is a test" >> /tmp/my_own_log.log 2>&1@@$(g.execRun)##$(g.uuid)@#Job returned a success return code after the last completed execution (/bin/echo "This is a test" >> /tmp/my_own_log.log 2>&1)

I'm unsure which character breaks reporting, but I'm sure it's pretty easy to reproduce on one of our machines.

Updated by Nicolas CHARLES almost 14 years ago Actions #3

I can't exactly reproduice this error
I choosed the command

/bin/echo \"This is a test\" >> /tmp/my_own_log.log 2>&1

on CentOS
and it led to unknown reports with the key value
/bin/echo "This is a test" >> /tmp/my_own_log.log 2>&1

because the \" is converted to " within the cfengine code

Updated by Nicolas CHARLES almost 14 years ago Actions #4

I'm checking if the \" -> " exists also on rudder 2.3

Updated by Nicolas PERRON almost 14 years ago Actions #5

Nicolas CHARLES wrote:

I can't exactly reproduice this error
I choosed the command
[...]
on CentOS
and it led to unknown reports with the key value
[...]

because the \" is converted to " within the cfengine code

Ok, the command to use was missing the tricky part: Use of CFEngine variable

Here is a command which turn to a "No Answer" state:

/bin/echo 'This is a test' >> /tmp/my_own_log_on_${sys.host}.log 2>&1

Updated by Nicolas PERRON almost 14 years ago Actions #6

  • Subject changed from Reports containing special characters aren't displayed in the WebUI to Reports containing CFEngine variable aren't displayed in the WebUI
  • Description updated (diff)

Nicolas PERRON wrote:

Nicolas CHARLES wrote:

I can't exactly reproduice this error
I choosed the command
[...]
on CentOS
and it led to unknown reports with the key value
[...]

because the \" is converted to " within the cfengine code

Ok, the command to use was missing the tricky part: Use of CFEngine variable

Here is a command which turn to a "No Answer" state:
[...]

As a consequence I change the title and description of the ticket

Updated by Nicolas PERRON almost 14 years ago Actions #7

  • Assignee changed from Nicolas PERRON to Nicolas CHARLES

Updated by Nicolas PERRON almost 14 years ago Actions #8

  • Target version changed from 2.4.2 to 2.4.3

Updated by Nicolas CHARLES almost 14 years ago Actions #9

Ha, others bugs/details show that the logs are not sent to Rudder (or parsed by Rudder) for the line
R: @jobScheduler@log_info@f3cc8d3a-cdae-4e7b-9b43-d8bec3686537@4040600f-f01e-4471-93ec-fd03cf096d0d@17@Job@/bin/echo This is a test >> /tmp/my_own_log_on_centos-5-32.log 2>&1@2013-01-08 12:43:54+01:00##248c8e3d-1bf6-4bc1-9398-f8890b015a50@#The command will be run at a random time after 11:00 on this node (/bin/echo This is a test >> /tmp/my_own_log_on_centos-5-32.log 2>&1)

Updated by Jonathan CLARKE almost 14 years ago Actions #10

Nicolas CHARLES wrote:

Ha, others bugs/details show that the logs are not sent to Rudder (or parsed by Rudder) for the line
R: @jobScheduler@log_info@f3cc8d3a-cdae-4e7b-9b43-d8bec3686537@4040600f-f01e-4471-93ec-fd03cf096d0d@17@Job@/bin/echo This is a test >> /tmp/my_own_log_on_centos-5-32.log 2>&1@2013-01-08 12:43:54+01:00##248c8e3d-1bf6-4bc1-9398-f8890b015a50@#The command will be run at a random time after 11:00 on this node (/bin/echo This is a test >> /tmp/my_own_log_on_centos-5-32.log 2>&1)

To tell which case it is (not sent to Rudder or not parsed by Rudder), check the intermediate syslogs: /var/log/syslog on the node and /var/log/rudder/reports/ on the Rudder server. If they contain the line, the problem is in the parsing by rsyslog.

Updated by Nicolas CHARLES almost 14 years ago Actions #11

Ok, here the problem is our regexp for rsyslog, the component key is 64 character long max, and the key is 68 in this example

Updated by Nicolas CHARLES almost 14 years ago Actions #12

  • Status changed from Discussion to Pending technical review

This bug is resolved by the correction of of #3158 and #3160

Updated by Jonathan CLARKE almost 14 years ago Actions #13

  • Status changed from Pending technical review to Pending release

Updated by Nicolas PERRON over 13 years ago Actions #14

  • Status changed from Pending release to Released

Updated by Benoît PECCATTE over 11 years ago Actions #15

  • Category changed from 14 to Web - Config management
Actions

Also available in: PDF Atom