Project

General

Profile

Bug #9130

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

Added by Vincent MEMBRÉ about 3 years ago. Updated 6 months ago.

Status:
Released
Priority:
1
Category:
Web - Compliance & node report
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Priority:
70

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

Associated revisions

Revision be8b7203 (diff)
Added by Nicolas CHARLES 7 months ago

Fixes #9130: Reporting missing if several generic methods with same class_prefix and different condition applied

Revision 1f80ab06 (diff)
Added by Nicolas CHARLES 7 months ago

Fixes #9130: Reporting missing if several generic methods with same class_prefix and different condition applied

History

#1

Updated by François ARMAND about 3 years ago

  • Status changed from New to In progress
#2

Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 3.1.14 to 3.1.15
#3

Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 3.1.15 to 3.1.16
#4

Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 3.1.16 to 3.1.17
#5

Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 3.1.17 to 3.1.18
#6

Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 3.1.18 to 3.1.19
#7

Updated by Benoît PECCATTE over 2 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
#8

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 3.1.19 to 3.1.20
#9

Updated by Jonathan CLARKE over 2 years ago

  • Status changed from In progress to New
#10

Updated by Jonathan CLARKE over 2 years ago

  • Assignee deleted (François ARMAND)
#11

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 3.1.20 to 3.1.21
#12

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 3.1.21 to 3.1.22
#13

Updated by Benoît PECCATTE over 2 years ago

  • Priority changed from 15 to 28
#14

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 3.1.22 to 3.1.23
#15

Updated by Vincent MEMBRÉ about 2 years ago

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

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.1.24 to 3.1.25
#17

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 3.1.25 to 387
#18

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 387 to 4.1.10
#19

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 4.1.10 to 4.1.11
#20

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.11 to 4.1.12
#21

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.12 to 4.1.13
#22

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.13 to 4.1.14
#23

Updated by Benoît PECCATTE over 1 year ago

  • Target version changed from 4.1.14 to 4.1.15
#24

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 4.1.15 to 4.1.16
#25

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 4.1.16 to 4.1.17
#26

Updated by Vincent MEMBRÉ 12 months ago

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

Updated by Vincent MEMBRÉ 11 months ago

  • Target version changed from 4.1.18 to 4.1.19
#28

Updated by Alexis MOUSSET 10 months ago

  • Target version changed from 4.1.19 to 4.1.20
#29

Updated by François ARMAND 9 months ago

  • Target version changed from 4.1.20 to 4.1.21
#30

Updated by François ARMAND 8 months ago

  • Tags 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
#31

Updated by Nicolas CHARLES 8 months 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

#32

Updated by Nicolas CHARLES 8 months 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)

#33

Updated by Nicolas CHARLES 8 months 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

#34

Updated by Nicolas CHARLES 8 months ago

  • Tags changed from Sponsored, community to Sponsored, community, Next minor release
#35

Updated by Nicolas CHARLES 8 months ago

  • Tags 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});
}
~                  

#36

Updated by Nicolas CHARLES 8 months ago

  • Tags changed from Sponsored, community to Sponsored, community, Next minor release
#37

Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 5.0.9 to 5.0.10
#38

Updated by Nicolas CHARLES 7 months ago

  • Status changed from New to In progress
#39

Updated by Nicolas CHARLES 7 months 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
#40

Updated by Nicolas CHARLES 7 months ago

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

Updated by Nicolas CHARLES 7 months ago

  • Status changed from Pending technical review to Pending release
#43

Updated by Vincent MEMBRÉ 6 months ago

  • Status changed from Pending release to Released

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

Also available in: Atom PDF