Project

General

Profile

Actions

Bug #21088

closed

Reporting issues when using multiple directives of the same technique on a node

Bug #21088: Reporting issues when using multiple directives of the same technique on a node

Added by Félix DALLIDET over 3 years ago. Updated over 3 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
User visibility:
First impressions of Rudder
Effort required:
Medium
Priority:
106
Name check:
To do
Fix check:
Checked
Regression:

Description

Since 7.1 the reporting of the methods is now based on an id generated in the technique by the webapp. Each method call has a unique id, but the calls can be repeated with different parameters:
when using multiple directives of the same technique.

I attached a minimal technique export to reproduce the issue. If you setup 2 directives from it on one of your node, it will break and the second directive in alphabetical order will not be executed at all.

The solution here is to change the reporting to based it on the concatenation of multiple ids.


Files

testing_missing_reports.json (1.04 KB) testing_missing_reports.json Félix DALLIDET, 2022-05-10 17:09
clipboard-202206201601-g5glj.png (106 KB) clipboard-202206201601-g5glj.png François ARMAND, 2022-06-20 16:01
clipboard-202206201602-siy5y.png (86.4 KB) clipboard-202206201602-siy5y.png François ARMAND, 2022-06-20 16:02
test_file.json (901 Bytes) test_file.json François ARMAND, 2022-06-20 16:02
clipboard-202206201603-9tq0g.png (53.9 KB) clipboard-202206201603-9tq0g.png François ARMAND, 2022-06-20 16:03
clipboard-202206201604-vzdej.png (56.9 KB) clipboard-202206201604-vzdej.png François ARMAND, 2022-06-20 16:04
clipboard-202206201601-g5glj.png
clipboard-202206201602-siy5y.png
clipboard-202206201603-9tq0g.png
clipboard-202206201604-vzdej.png

Subtasks 1 (0 open1 closed)

Bug #21096: Reporting issues when using multiple directives of the same technique on a node - scala partReleasedVincent MEMBRÉActions

Updated by Félix DALLIDET over 3 years ago Actions #1

  • Status changed from New to In progress
  • Assignee set to Félix DALLIDET

Updated by Félix DALLIDET over 3 years ago Actions #2

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Alexis Mousset
  • Pull Request set to https://github.com/Normation/ncf/pull/1352

Updated by Félix DALLIDET over 3 years ago Actions #3

  • Status changed from Pending technical review to New
  • Assignee deleted (Alexis Mousset)
  • Pull Request deleted (https://github.com/Normation/ncf/pull/1352)

The generation needs to be changed in order to allow reexecution of same bundles inside a directive. A technique should look like:

# @name Testing missing reports
# @description 
# @version 1.0
# @parameter {"name":"unused","id":"b91416a2-cfcb-4fbf-9917-63646f96d3be","description":""}

bundle agent testing_missing_reports(unused)
{
  vars:
    "resources_dir" string => "${this.promise_dirname}/resources";
  classes:
    "pass3" expression => "pass2";
    "pass2" expression => "pass1";
    "pass1" expression => "any";

  methods:
    pass3::
      "d73dc29c-38d3-4e23-a2e9-170b555b4075${report_data.directive_id}" usebundle => _method_reporting_context_v4("Service enabled at boot", "ntpd","d73dc29c-38d3-4e23-a2e9-170b555b4075"),
                                                    if => concat("any");
      "${report_data.method_id}" usebundle => service_enabled("ntpd"),
                                                    if => concat("any");
      "64dbe513-700c-4880-af7c-e07dfe882800${report_data.directive_id}" usebundle => _method_reporting_context_v4("Service started", "ntpd","64dbe513-700c-4880-af7c-e07dfe882800"),
                                                    if => concat("any");
      "${report_data.method_id}" usebundle => service_started("ntpd"),
                                        if => concat("any");

}

Updated by Nicolas CHARLES over 3 years ago Actions #4

  • Status changed from New to Pending technical review
  • Assignee set to Nicolas CHARLES

Updated by Nicolas CHARLES over 3 years ago Actions #5

  • Related to Bug #21096: Reporting issues when using multiple directives of the same technique on a node - scala part added

Updated by Nicolas CHARLES over 3 years ago Actions #6

  • Pull Request set to https://github.com/Normation/ncf/pull/1352

Updated by Nicolas CHARLES over 3 years ago Actions #7

  • Assignee changed from Nicolas CHARLES to Félix DALLIDET
  • Pull Request changed from https://github.com/Normation/ncf/pull/1352 to https://github.com/Normation/ncf/pull/1353

Updated by Vincent MEMBRÉ over 3 years ago Actions #8

  • Related to deleted (Bug #21096: Reporting issues when using multiple directives of the same technique on a node - scala part)

Updated by Vincent MEMBRÉ over 3 years ago Actions #9

  • Target version changed from 7.1.1 to 7.1.2

Updated by Nicolas CHARLES over 3 years ago Actions #10

  • Assignee changed from Félix DALLIDET to Alexis Mousset

Updated by Félix DALLIDET over 3 years ago Actions #11

  • Status changed from Pending technical review to Pending release

Updated by Alexis Mousset over 3 years ago Actions #12

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

Updated by François ARMAND over 3 years ago Actions #13

clipboard-202206201601-g5glj.png
clipboard-202206201602-siy5y.png

I don't think it's corrected. I even get mixed reports between components ?

Export of the technique joined

Updated by François ARMAND over 3 years ago Actions #15

OK, it's just that file generic method is not corrected yet

Updated by François ARMAND over 3 years ago Actions #16

  • Fix check changed from To do to Checked

Works as expected for package

Updated by Vincent MEMBRÉ over 3 years ago Actions #17

  • Status changed from Pending release to Released

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

Actions

Also available in: PDF Atom