Bug #21088
closedReporting issues when using multiple directives of the same technique on a node
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
Updated by Félix DALLIDET over 2 years ago
- Status changed from New to In progress
- Assignee set to Félix DALLIDET
Updated by Félix DALLIDET over 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
Updated by Félix DALLIDET over 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"); }
Updated by Nicolas CHARLES over 2 years ago
- Status changed from New to Pending technical review
- Assignee set to Nicolas CHARLES
Updated by Nicolas CHARLES over 2 years ago
- 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 2 years ago
- Pull Request set to https://github.com/Normation/ncf/pull/1352
Updated by Nicolas CHARLES over 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
Updated by Vincent MEMBRÉ over 2 years ago
- 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 2 years ago
- Target version changed from 7.1.1 to 7.1.2
Updated by Nicolas CHARLES over 2 years ago
- Assignee changed from Félix DALLIDET to Alexis Mousset
Updated by Félix DALLIDET over 2 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder:ncf|5ecf847c3c75fa7ac5a26f8023645e1823a52e1c.
Updated by Alexis Mousset over 2 years ago
- Project changed from 41 to Rudder
- Category changed from Generic methods to Generic methods
Updated by François ARMAND over 2 years ago
- File clipboard-202206201601-g5glj.png clipboard-202206201601-g5glj.png added
- File clipboard-202206201602-siy5y.png clipboard-202206201602-siy5y.png added
- File test_file.json test_file.json added
- Priority changed from 107 to 106
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 2 years ago
- File clipboard-202206201603-9tq0g.png clipboard-202206201603-9tq0g.png added
- File clipboard-202206201604-vzdej.png clipboard-202206201604-vzdej.png added
Technical logs:
Agent run on node:
Updated by François ARMAND over 2 years ago
OK, it's just that file generic method is not corrected yet
Updated by François ARMAND over 2 years ago
- Fix check changed from To do to Checked
Works as expected for package
Updated by Vincent MEMBRÉ over 2 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 7.1.2 which was released today.