Project

General

Profile

Actions

Bug #9130

closed

Reporting missing if several generic methods with same class_prefix and different condition applied

Added by Vincent MEMBRÉ about 8 years ago. Updated over 2 years ago.

Status:
Released
Priority:
1 (highest)
Category:
Web - Compliance & node report
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Priority:
84
Name check:
Fix check:
Regression:

Description

If a I create a technique with two create file methods on /tmp/test with 'any' condition and 'AIX' condition, reporting is considered missing

Actions #1

Updated by François ARMAND about 8 years ago

  • Status changed from New to In progress
Actions #2

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.14 to 3.1.15
Actions #3

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.15 to 3.1.16
Actions #4

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.16 to 3.1.17
Actions #5

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 3.1.17 to 3.1.18
Actions #6

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 3.1.18 to 3.1.19
Actions #7

Updated by Benoît PECCATTE over 7 years ago

  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Priority set to 15
Actions #8

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.19 to 3.1.20
Actions #9

Updated by Jonathan CLARKE over 7 years ago

  • Status changed from In progress to New
Actions #10

Updated by Jonathan CLARKE over 7 years ago

  • Assignee deleted (François ARMAND)
Actions #11

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.20 to 3.1.21
Actions #12

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.21 to 3.1.22
Actions #13

Updated by Benoît PECCATTE over 7 years ago

  • Priority changed from 15 to 28
Actions #14

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.22 to 3.1.23
Actions #15

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.23 to 3.1.24
  • Priority changed from 28 to 27
Actions #16

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.24 to 3.1.25
Actions #17

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 3.1.25 to 387
Actions #18

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 387 to 4.1.10
Actions #19

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 4.1.10 to 4.1.11
Actions #20

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.1.11 to 4.1.12
Actions #21

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.1.12 to 4.1.13
Actions #22

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.1.13 to 4.1.14
Actions #23

Updated by Benoît PECCATTE over 6 years ago

  • Target version changed from 4.1.14 to 4.1.15
Actions #24

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.1.15 to 4.1.16
Actions #25

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.1.16 to 4.1.17
Actions #26

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 4.1.17 to 4.1.18
  • Priority changed from 27 to 0
Actions #27

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 4.1.18 to 4.1.19
Actions #28

Updated by Alexis Mousset almost 6 years ago

  • Target version changed from 4.1.19 to 4.1.20
Actions #29

Updated by François ARMAND over 5 years ago

  • Target version changed from 4.1.20 to 4.1.21
Actions #30

Updated by François ARMAND over 5 years ago

  • Translation missing: en.field_tag_list set to Sponsored, community
  • Severity changed from Minor - inconvenience | misleading | easy workaround to Major - prevents use of part of Rudder | no simple workaround
  • User visibility changed from Operational - other Techniques | Technique editor | Rudder settings to Operational - other Techniques | Rudder settings | Plugins
  • Priority changed from 0 to 70
Actions #31

Updated by Nicolas CHARLES over 5 years ago

  • Assignee set to Nicolas CHARLES
  • Target version changed from 4.1.21 to 5.0.9

This is unfixable in 4.1 - testing that it works as expected in 5.0

Actions #32

Updated by Nicolas CHARLES over 5 years ago

so - in 5.0, there is no missing report
However there is a leaking of reporting: the AIX get the same report as the Linux (the class leaks from the generic method to the noop)

Actions #33

Updated by Nicolas CHARLES over 5 years ago

the rudder_reporting.cf doesn't provide enough information to avoid the issue

we could replace

    "promisers"          slist => { @{this.callers_promisers}, cf_null }, policy => "ifdefined";
    "class_prefix"      string => canonify(join("_", "promisers"));
    "args"               slist => { };

by actual information, and set the classes_noop accordingly

Actions #34

Updated by Nicolas CHARLES over 5 years ago

  • Translation missing: en.field_tag_list changed from Sponsored, community to Sponsored, community, Next minor release
Actions #35

Updated by Nicolas CHARLES over 5 years ago

  • Translation missing: en.field_tag_list changed from Sponsored, community, Next minor release to Sponsored, community

for the record, a working implementation is:

bundle agent check_class_prefix_rudder_reporting
{
  vars:
    "promisers"          slist => { @{this.callers_promisers}, cf_null }, policy => "ifdefined";
    "class_prefix"      string => "check_class_prefix_rudder_reporting";
    "args"               slist => { };

  methods:

    !(aix)::
      "dummy_report" usebundle => _classes_noop("${class_prefix}_file_present__tmp_test");
      "dummy_report_0" usebundle => _method_reporting_context("File present", "/tmp/test");
      "edummy_report" usebundle => log_rudder("File present /tmp/test if aix", "/tmp/test", "${class_prefix}_file_present__tmp_test", "${class_prefix}_file_present__tmp_test", @{args});

    !(linux)::
      "dummy_report" usebundle => _classes_noop("${class_prefix}_file_present__tmp_test");
      "dummy_report_1" usebundle => _method_reporting_context("File present", "/tmp/test");
      "dummy_report" usebundle => log_rudder("File present /tmp/test if linux", "/tmp/test", "${class_prefix}_file_present__tmp_test", "${class_prefix}_file_present__tmp_test", @{args});

    !(any.(aix))::
      "dummy_report" usebundle => _classes_noop("${class_prefix}_condition_from_command_test");
      "dummy_report_2" usebundle => _method_reporting_context("Condition from command", "test");
      "dummy_report" usebundle => log_rudder("Condition from command test if any.(aix)", "test", "${class_prefix}_condition_from_command_test", "${class_prefix}_condition_from_command_test", @{args});
}
~                  

Actions #36

Updated by Nicolas CHARLES over 5 years ago

  • Translation missing: en.field_tag_list changed from Sponsored, community to Sponsored, community, Next minor release
Actions #37

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 5.0.9 to 5.0.10
Actions #38

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from New to In progress
Actions #39

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/ncf/pull/961
Actions #40

Updated by Nicolas CHARLES over 5 years ago

  • Assignee changed from Vincent MEMBRÉ to François ARMAND
Actions #41

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset ncf:commit:be8b720338a694d2a831cc7ca67a86840e5ed28f.

Actions #42

Updated by Nicolas CHARLES over 5 years ago

Applied in changeset ncf:commit:1f80ab065a55354c85b0a26ef8d1137184a5ee12.

Actions #43

Updated by Vincent MEMBRÉ over 5 years ago

  • Status changed from Pending release to Released

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

Actions #44

Updated by Alexis Mousset over 2 years ago

  • Priority changed from 70 to 84
Actions

Also available in: Atom PDF