Project

General

Profile

Actions

Bug #21088

closed

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

Added by Félix DALLIDET almost 2 years ago. Updated almost 2 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

Subtasks 1 (0 open1 closed)

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

Updated by Félix DALLIDET almost 2 years ago

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

Updated by Félix DALLIDET almost 2 years ago

  • 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
Actions #3

Updated by Félix DALLIDET almost 2 years ago

  • 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");

}

Actions #4

Updated by Nicolas CHARLES almost 2 years ago

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

Updated by Nicolas CHARLES almost 2 years ago

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

Updated by Nicolas CHARLES almost 2 years ago

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

Updated by Nicolas CHARLES almost 2 years ago

  • 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
Actions #8

Updated by Vincent MEMBRÉ almost 2 years ago

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

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 7.1.1 to 7.1.2
Actions #10

Updated by Nicolas CHARLES almost 2 years ago

  • Assignee changed from Félix DALLIDET to Alexis Mousset
Actions #11

Updated by Félix DALLIDET almost 2 years ago

  • Status changed from Pending technical review to Pending release
Actions #12

Updated by Alexis Mousset almost 2 years ago

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

Updated by François ARMAND almost 2 years ago

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

Export of the technique joined

Actions #15

Updated by François ARMAND almost 2 years ago

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

Actions #16

Updated by François ARMAND almost 2 years ago

  • Fix check changed from To do to Checked

Works as expected for package

Actions #17

Updated by Vincent MEMBRÉ almost 2 years ago

  • 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: Atom PDF