Project

General

Profile

Bug #15572

Reporting context is not re-evaluated when using multiple directives of the same technique

Added by Félix DALLIDET 3 months ago. Updated about 2 months ago.

Status:
Released
Priority:
N/A
Category:
Technique editor - Techniques
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

Description

I ended up with missing reports while defining quite simple configuration in the technique editor.
The faulty technique is attached to the ticket.

PB:
When defining multiple directives from this technique only the first instance executed was correctly reporting, all other directives
were reporting wrongly on the "Condition from variable existence" with a component_name set to "None".

This is due to the promiser of _method_reporting_context which was:

Condition from variable existence_context_0

Which is not re-evaluated at each bundle call since only depending on static values: the 0 for the promiser and the class_parameter for the parameters which is common to all directives.
To avoid this, we should keep the incremental suffix but also add an arbitrary value in the promiser, depending on the directive we are executing. For instance, the promiser id.

Which fixed the problem with a promiser like:

"Condition from variable existence_context_${report_data.directive_id}_0" 


Files

Disable kernel module disabled.json (1.12 KB) Disable kernel module disabled.json Félix DALLIDET, 2019-08-23 15:39

Subtasks

Bug #15573: Same a parent ticket for branch 5.1ReleasedVincent MEMBRÉActions
Bug #15576: Don't parse _${report_data.directive} as report componentReleasedNicolas CHARLESActions

Associated revisions

Revision 830cf43c (diff)
Added by Nicolas CHARLES 3 months ago

Fixes #15572: Reporting context is not re-evaluated when using multiple directives of the same technique

History

#1

Updated by Nicolas CHARLES 3 months ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
#2

Updated by Nicolas CHARLES 3 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/ncf/pull/1049
#3

Updated by Nicolas CHARLES 3 months ago

  • Status changed from Pending technical review to Pending release
#7

Updated by Vincent MEMBRÉ 2 months ago

This bug has been fixed in Rudder 5.0.13 which was released today.

#8

Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from Pending release to Released

Also available in: Atom PDF