Actions
Bug #21202
openreporting is broken when using iterator
Pull Request:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
I hate Rudder for that
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Priority:
58
Name check:
To do
Fix check:
To do
Regression:
Description
I'm using an iterator to check that packages are installed, and the reporting is broken.
Output of the agent shows the last element of the list for each
A| compliant sc_nario_1 Package present vlock Presence of package acct in latest available version was correct A| compliant sc_nario_1 Package present vlock Presence of package aide-common in latest available version was correct A| compliant sc_nario_1 Package present vlock Presence of package debsums in latest available version was correct A| compliant sc_nario_1 Package present vlock Presence of package gnupg2 in latest available version was correct A| compliant sc_nario_1 Package present vlock Presence of package haveged in latest available version was correct A| compliant sc_nario_1 Package present vlock Presence of package needrestart in latest available version was correct A| compliant sc_nario_1 Package present vlock Presence of package unattended-upgrades in latest available version was correct 2022-06-01T10:41:04+00:00 warning: Should install repo type package: update-notifier-common, but only warning promised A| non-compliant sc_nario_1 Package present vlock If you tried to install a virtual package, please use in place the concrete package you want to install. 2022-06-01T10:41:04+00:00 Presence of package update-notifier-common in latest available version was not correct 2022-06-01T10:41:04+00:00 warning: Should install repo type package: vlock, but only warning promised A| non-compliant sc_nario_1 Package present vlock If you tried to install a virtual package, please use in place the concrete package you want to install. 2022-06-01T10:41:04+00:00 Presence of package vlock in latest available version was not correct
In the rule page, the compliance by node display is broken
In the rule page, the compliance by directive display is broken
Note that in both case, the compliant percentage is correct
In the node page, the compliance display is invalid
technique is attached
The compliance of top level is ok, but not the compliance of the component itself
Compliance by api for node returns
"rules":[{"id":"d36ed31c-a697-469a-97a7-871ecb0cdc2c","name":"Test on node 1","compliance":88.24000000000001,"complianceDetails":{"auditCompliant":76.48,"auditNonCompliant":11.76,"auditNotApplicable":11.76},"directives":[{"id":"f030dec6-ba37-451b-9a04-82b45e92c88f","name":"Scénario 1","compliance":80.0,"complianceDetails":{"auditCompliant":80.0,"auditNonCompliant":20.0},"components":[{"name":"Package installation","compliance":80.0,"complianceDetails":{"auditCompliant":80.0,"auditNonCompliant":20.0},"components":[{"name":"Package present","compliance":77.78,"complianceDetails":{"auditCompliant":77.78,"auditNonCompliant":22.22},"values":[{"value":"vlock","reports":[{"status":"auditNonCompliant","message":"If you tried to install a virtual package, please use in place the concrete package you want to install.\nPresence of package vlock in latest available version was not correct"},{"status":"auditNonCompliant","message":"If you tried to install a virtual package, please use in place the concrete package you want to install.\nPresence of package update-notifier-common in latest available version was not correct"},{"status":"auditCompliant","message":"Presence of package unattended-upgrades in latest available version was correct"},{"status":"auditCompliant","message":"Presence of package needrestart in latest available version was correct"},{"status":"auditCompliant","message":"Presence of package haveged in latest available version was correct"},{"status":"auditCompliant","message":"Presence of package gnupg2 in latest available version was correct"},{"status":"auditCompliant","message":"Presence of package debsums in latest available version was correct"},{"status":"auditCompliant","message":"Presence of package aide-common in latest available version was correct"},{"status":"auditCompliant","message":"Presence of package acct in latest available version was correct"}]}]}
Files
Updated by Nicolas CHARLES over 2 years ago
Quick and dirty solution
replace
"fe5f0d59-9ee9-49bb-8c25-36d0a509d994_${report_data.directive_id}" usebundle => _method_reporting_context_v4("Package present", "${package_scenario1.present}","fe5f0d59-9ee9-49bb-8c25-36d0a509d994"), if => concat("any"); "fe5f0d59-9ee9-49bb-8c25-36d0a509d994_${report_data.directive_id}" usebundle => package_present("${package_scenario1.present}", "latest", "", ""), if => concat("any");
by
"fe5f0d59-9ee9-49bb-8c25-36d0a509d994_${report_data.directive_id}" usebundle => fe5f0d59-9ee9-49bb-8c25-36d0a509d994_method_1("Package present", "${package_scenario1.present}","fe5f0d59-9ee9-49bb-8c25-36d0a509d994","${package_scenario1.present}", "latest", "", "" );
where
bundle agent fe5f0d59-9ee9-49bb-8c25-36d0a509d994_method_1(a, b, c ,d, e, f ,g) { methods: "fe5f0d59-9ee9-49bb-8c25-36d0a509d994_${report_data.directive_id}" usebundle => _method_reporting_context_v4("${a}", "${b}","${c}"), if => concat("any"); "fe5f0d59-9ee9-49bb-8c25-36d0a509d994_${report_data.directive_id}" usebundle => package_present("${d}", "${e}", "${f}", "${g}"), if => concat("any");
Actions
#2
Updated by Nicolas CHARLES over 2 years ago
- File clipboard-202206011639-z2au9.png clipboard-202206011639-z2au9.png added
- File clipboard-202206011640-tgnvk.png clipboard-202206011640-tgnvk.png added
with the change up there the result is
Updated by Alexis Mousset over 2 years ago
- Severity set to Minor - inconvenience | misleading | easy workaround
- User visibility set to Infrequent - complex configurations | third party integrations
- Priority changed from 0 to 22
Updated by Nicolas CHARLES over 2 years ago
- Related to Bug #20603: Reports on method using iterator are wrong in the cli output added
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 7.1.2 to 7.1.3
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 7.1.3 to 7.1.4
- Priority changed from 22 to 21
Updated by Vincent MEMBRÉ about 2 years ago
- Target version changed from 7.1.4 to 7.1.5
- Priority changed from 21 to 68
Updated by Vincent MEMBRÉ about 2 years ago
- Target version changed from 7.1.5 to 7.1.6
- Priority changed from 68 to 67
Updated by Vincent MEMBRÉ about 2 years ago
- Target version changed from 7.1.6 to 7.1.7
Updated by Vincent MEMBRÉ about 2 years ago
- Target version changed from 7.1.7 to 7.1.8
- Priority changed from 67 to 66
Updated by Vincent MEMBRÉ almost 2 years ago
- Target version changed from 7.1.8 to 7.1.9
- Priority changed from 66 to 64
Updated by Vincent MEMBRÉ almost 2 years ago
- Target version changed from 7.1.9 to 7.1.10
Updated by Vincent MEMBRÉ almost 2 years ago
- Target version changed from 7.1.10 to 1016
- Priority changed from 64 to 62
Updated by Alexis Mousset over 1 year ago
- Target version changed from 1016 to 7.2.5
- Priority changed from 62 to 61
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.2.5 to 7.2.6
- Priority changed from 61 to 60
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.2.6 to 7.2.7
- Priority changed from 60 to 59
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.2.7 to 7.2.8
- Priority changed from 59 to 58
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.2.8 to 7.2.9
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.2.9 to 7.2.10
Updated by Alexis Mousset over 1 year ago
- Target version changed from 7.2.10 to 7.2.11
Updated by Vincent MEMBRÉ about 1 year ago
- Target version changed from 7.2.11 to 1046
Updated by Alexis Mousset about 1 year ago
- Target version changed from 1046 to 7.3.8
Updated by Vincent MEMBRÉ about 1 year ago
- Target version changed from 7.3.8 to 7.3.9
Updated by Vincent MEMBRÉ about 1 year ago
- Target version changed from 7.3.9 to 7.3.10
Updated by François ARMAND about 1 year ago
- Related to Bug #16105: When we are using iterator in generic method condition only, the multiple reports are not correctly accumulated together added
Updated by Vincent MEMBRÉ 12 months ago
- Target version changed from 7.3.10 to 7.3.11
Updated by Vincent MEMBRÉ 10 months ago
- Target version changed from 7.3.11 to 7.3.12
Updated by Vincent MEMBRÉ 9 months ago
- Target version changed from 7.3.12 to 7.3.13
Updated by Vincent MEMBRÉ 9 months ago
- Target version changed from 7.3.13 to 7.3.14
Updated by Vincent MEMBRÉ 7 months ago
- Target version changed from 7.3.14 to 7.3.15
Updated by Vincent MEMBRÉ 6 months ago
- Target version changed from 7.3.15 to 7.3.16
Updated by Vincent MEMBRÉ 5 months ago
- Target version changed from 7.3.16 to 7.3.17
Updated by Alexis Mousset 22 days ago
- Related to Bug #25151: Iterators do no properly work with the “Service enabled at boot” method added
Updated by Alexis Mousset 21 days ago
- Related to Bug #25776: Create a global method call counter to help provide more unicity added
Actions