Project

General

Profile

Bug #4806

When two techniques generated with ncf-builder use the same generic method with same parameters, reporting cannot dinstinguish them, and reports "Unknown"

Added by Nicolas PERRON over 4 years ago. Updated almost 2 years ago.

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

Description

If we use, in different techniques generated by ncf-builder, the same components with the same values, thenthe reporting cannot distringuih which reports should match which technique, and we get "unknown" and "no answer" states

The Techniques generated by ncf-builder have a unique name, which is also the bundle name
Rudder generates a csv file for reporting, in the format

technique_name;;class_prefix_${key};;@RUDDER_ID@;;component name;;component key

So far, we used only the class_prefix_${key} as a key to extract data from the this csv file, to get the line to report. Problem: we may have several time the same class_prefix_${key}, if we use in different technique the same component with same value.

Since we know the technique_name (we are calling it in the bundlesequence), we can use it in the key to search the csv file

However, we don't want to pass the technique name down the chain of generic method, as it would be clunky, so we inject it in the bundle current_technique_report_info, by calling this bundle with the current ncf technique name
And then, we change the logger_rudder to retrieve this value and expose the proper report line

This ticket part is to add the bundle that stores the current technique name, called current_technique_report_info(technique_name) and use the information in the logger_rudder

It needs the modification that is in ncf in #5389 taht calls current_technique_report_info(technique_name) before calling the technique


Related issues

Related to Rudder - Bug #5330: When using several times a generic_method on same file with class_prefix based on filename, reports will be in "Unknown" and "No answer" statusReleased2014-07-31
Related to Rudder - Bug #6149: Update dependency between Rudder and ncfReleased2015-01-16
Related to ncf - Bug #4797: When using multiple times the same generic method on the same object, the reporting will be broken for all of themRejected
Related to Rudder - Bug #5389: When two techniques generated with ncf-builder use the same generic method with same parameters, reporting cannot dinstinguish them, and reports "Unknown"Released2015-01-16

Associated revisions

Revision a4db97e5 (diff)
Added by Nicolas CHARLES over 3 years ago

Fixes #4806: distinguish the Technique we are doing report on

Revision dd7f176e
Added by Benoît PECCATTE over 3 years ago

Merge pull request #167 from ncharles/bug_4806/dev/reporting_on_ncf

Fixes #4806: distinguish the Technique we are doing report on

History

#1 Updated by Nicolas PERRON about 4 years ago

  • Subject changed from Generation of expected reports from a MetaTechnique containing installation of a package of different version create duplicate expected reports to Generation of expected reports from a MetaTechnique containing a method per OS with different arguments but same class_prefix create duplicate expected reports

The problem is observed when a method is called with different arguments per OS but resulting in a same class_result (same class_prefix).
By example, the use of:
- package_install_version("my_package","1.0"); and package_install_version("my_package","1.5");
- file_create_symlink_force("file1","my_symlink"); and file_create_symlink_force("file2","my_symlink");

A workaround could be to use variables in 40_it_ops_knowledge.

#2 Updated by Nicolas CHARLES over 3 years ago

  • Status changed from New to Pending technical review
  • Assignee set to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/ncf/pull/167

#3 Updated by Nicolas CHARLES over 3 years ago

This ticket updates the logger_rudder, to add the bundle which contains the injection of the report info, and used it

Linked to http://www.rudder-project.org/redmine/issues/5389

#4 Updated by Nicolas CHARLES over 3 years ago

  • Subject changed from Generation of expected reports from a MetaTechnique containing a method per OS with different arguments but same class_prefix create duplicate expected reports to When two techniques generated with ncf-builder use the same generic method with same parameters, reporting cannot dinstinguish them, and reports "Unknown"
  • Description updated (diff)

#5 Updated by Nicolas CHARLES over 3 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

#7 Updated by Vincent MEMBRÉ almost 2 years ago

  • Status changed from Pending release to Released

Also available in: Atom PDF