Project

General

Profile

Actions

Bug #12694

closed

In Rudder 4.1, we cannot do reporting using a variable defined in a generic method

Added by Nicolas CHARLES almost 6 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Generic methods
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Medium
Priority:
0
Name check:
Fix check:
Regression:

Description

If we define a variable in a generic method, it is define during the run of the agent
If we plan on using it for reporting, then it will be used in the expected_reports.csv to generate expected report
however, as cfengine 3.10 ignore undefined variable, the line is completely deleted in the resulting expected report.csv file, and we don't get report


Related issues 2 (0 open2 closed)

Related to Rudder - Bug #12693: Reporting context is not set correctly when using an iterator somewhereReleasedBenoît PECCATTEActions
Related to Rudder - Bug #12859: Reports from multivalued variable lead to unexpected and should notRejectedFrançois ARMANDActions
Actions #1

Updated by Nicolas CHARLES almost 6 years ago

So, there are 2 issues there:
  1. the expected_reports.csv.res doesn't contains the line with the variable, as it is non expendable in the canonification
  2. we can detect line that won't get in the file because variable is not defined - but simply adding the non expended line in the .csv.res file doesn't work either, as it won't be match at log time
So an idea is to have a expected_report.csv.non_expanded for these case, and when doing the report:
  1. if we can match an entry in the expected_report.csv.res we use it
  2. if not, we expand the results of expected_reports.csv_non_expanded, and look for it inside

risk is performance issue
Idealy, we would not read/write the non_expanded at each non valid report, but use an in memory array

Actions #2

Updated by Nicolas CHARLES almost 6 years ago

  • Status changed from New to In progress
Actions #3

Updated by Benoît PECCATTE almost 6 years ago

  • Severity set to Critical - prevents main use of Rudder | no workaround | data loss | security
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Effort required set to Medium
  • Priority changed from 0 to 59
Actions #4

Updated by Benoît PECCATTE almost 6 years ago

  • Related to Bug #12693: Reporting context is not set correctly when using an iterator somewhere added
Actions #5

Updated by Nicolas CHARLES almost 6 years ago

Openned a ticket on CFEngine bugtracker: https://tracker.mender.io/browse/CFE-2830
we cannot use iterator, but we can use plain strings

Actions #6

Updated by Benoît PECCATTE almost 6 years ago

In 4.1 this is a cfengine problem
This has been solved in 4.3 by changing hos reports work.

Actions #7

Updated by Nicolas CHARLES almost 6 years ago

Ok, Node properties work. It's "simply" all variables defined in technique editor that cannot be used

Actions #8

Updated by Vincent MEMBRÉ almost 6 years ago

All variables defined using generic_variable_definition will also be ignored (in fact using variable that are only defined on agent side doesn ot work in reporting)

Actions #9

Updated by Nicolas CHARLES almost 6 years ago

Actually, the generic_variable_definition are the only variables (with node properties) that works in reporting in technique editor

Actions #10

Updated by François ARMAND almost 6 years ago

  • Related to Bug #12859: Reports from multivalued variable lead to unexpected and should not added
Actions #11

Updated by Alexis Mousset over 5 years ago

  • Status changed from In progress to New
  • Priority changed from 59 to 55
Actions #12

Updated by François ARMAND about 5 years ago

  • Status changed from New to Rejected
  • Priority changed from 55 to 0

We can't correct it in 4.1. It was corrected in 4.3 and up. Please upgrade if that issue is impacting for you.

Actions #13

Updated by Alexis Mousset almost 2 years ago

  • Project changed from 41 to Rudder
  • Category changed from Generic methods to Generic methods
Actions

Also available in: Atom PDF