Project

General

Profile

Actions

Bug #5389

closed

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 almost 8 years ago. Updated over 7 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Compliance & node report
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:

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 change the bundlesequence, to call current_technique_report_info(technique_name) before calling technique_name
It needs the modification that is in ncf in #4806 that create the bundle that stores the technique name, and update the logger_rudder to use this information


Subtasks 4 (0 open4 closed)

Bug #6171: There are no Not applicable reports anymore with ncf techniqueReleasedFrançois ARMAND2015-01-22Actions
Bug #6178: generated bundlesequence contains "Bundle", making the agent non functionnalReleasedFrançois ARMAND2015-01-26Actions
Bug #6163: The generated promises are invalid when there are no ncf techniquesReleasedFrançois ARMAND2015-01-21Actions
Bug #6149: Update dependency between Rudder and ncfReleasedBenoît PECCATTE2015-01-16Actions

Related issues 3 (0 open3 closed)

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" statusReleasedVincent MEMBRÉ2014-07-31Actions
Related to Rudder - Bug #4797: When using multiple times the same generic method on the same object, the reporting will be broken for all of themRejectedActions
Related to Rudder - Bug #4806: When two techniques generated with ncf-builder use the same generic method with same parameters, reporting cannot dinstinguish them, and reports "Unknown"ReleasedBenoît PECCATTEActions
Actions #1

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 2.10.5 to 2.10.6
Actions #2

Updated by Matthieu CERDA almost 8 years ago

  • Target version changed from 2.10.6 to 2.10.7
Actions #3

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 2.10.7 to 2.10.8
Actions #4

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 2.10.8 to 2.10.9
Actions #5

Updated by Nicolas CHARLES over 7 years ago

  • Status changed from New to Pending technical review
  • Assignee changed from Nicolas CHARLES to François ARMAND
  • Pull Request set to https://github.com/Normation/cf-clerk/pull/67
Actions #6

Updated by François ARMAND over 7 years ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from François ARMAND to Nicolas CHARLES

Could you explain the whole scheme of resolution of that one?

AFAIU, the idea is:

- to provide on the ncf side something that set a variable to the current technique to report on,
- when we generate the bundle sequence, before each ncf technique, we set the variable to the name of the technique, so that the reporting is done correctly.

Is it that ?

Also, could clearly explain in which ticket each part of the logic is implemented ?

Actions #7

Updated by Nicolas CHARLES over 7 years ago

  • Status changed from Discussion to Pending technical review
  • Assignee changed from Nicolas CHARLES to François ARMAND

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 change the bundlesequence, to call current_technique_report_info(technique_name) before calling tehcnique_name

Actions #8

Updated by Nicolas CHARLES over 7 years ago

The other ticket is http://www.rudder-project.org/redmine/issues/4806 but i cannot link it

Actions #9

Updated by François ARMAND over 7 years ago

OK, so could you update the title and description of both this ticket and #4806 so that:

- the actual problem is clearly stated (the current title is just a sample, it should be used in the description to illustrate what is happening with a concrete case)
- the description on both ticket looks like your last comment, which actually explain really well the problem
- the description of that tickets states something like: "this ticket need the fixes in #4806 that will use the technique name in the rudder-logger of ncf at the right place" (or actually, what is sensible :)

Thanks!

Actions #10

Updated by Nicolas CHARLES over 7 years ago

  • Subject changed from A Directive based on a metatechnique which use the methods service_ensure_running and service_ensure_running_at_boot on the same service will be in "Unknown" state 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)
Actions #11

Updated by Nicolas CHARLES over 7 years ago

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

Applied in changeset clerk:commit:4b2f07d02386bd6fd38ee27457080ce667e9c548.

Actions #12

Updated by François ARMAND over 7 years ago

Applied in changeset clerk:commit:7f8dc262c3fe712dd3483d0566f0e4739b9cf15e.

Actions #13

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 2.10.9 to 2.10.10
Actions #14

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.10.10 and 2.11.7, which were these days.

Actions

Also available in: Atom PDF