Project

General

Profile

Actions

Bug #11129

closed

Using of two "File ensure key value in parameter list" methods in the same technique causes the second one to report failed if the first one fails.

Added by Hamlyn Mootoo over 7 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Techniques
Target version:
-
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
43
Name check:
Fix check:
Regression:

Description

Please see the attached screenshots for the definition of the technique. the directive created from this technique is set to audit mode.

The initial contents of the file (/tmp/test) being operated on is as follows:

options     color=blue height=4 width=5

The result of the agent running is:

A| compliant     test                      File ensure key value pa| /tmp/test          Add key non existing options with value  height=4  in /tmp/test was correct
A| compliant     test                      File ensure key value pa| /tmp/test          Add key non existing options with value  width=5  in /tmp/test was correct

When the contents of the file change to:

options     color=blue height=99 width=5

the result becomes:

A| non-compliant test                      File ensure key value pa| /tmp/test          Add key non existing options with value  height=4  in /tmp/test was not correct
A| non-compliant test                      File ensure key value pa| /tmp/test          Add key non existing options with value  width=5  in /tmp/test was not correct

However, if the contents of the file are:

options     color=blue height=4 width=99

the result becomes:

A| compliant     test                      File ensure key value pa| /tmp/test          Add key non existing options with value  height=4  in /tmp/test was correct
A| non-compliant test                      File ensure key value pa| /tmp/test          Add key non existing options with value  width=5  in /tmp/test was not correct

If the order of the methods that are defined in the technique is exchanged, the behavior is the exact opposite, so it seems that whichever method is listed first, if it fails, makes the status of the second method fail even if it should be successful.


Files


Related issues 2 (0 open2 closed)

Is duplicate of Rudder - Bug #10838: File content (Key/value pair) reports for all entries, even if only one changesRejectedActions
Is duplicate of Rudder - User story #12414: Make reporting work when targeting several time the same item with several generic methodReleasedAlexis MoussetActions
Actions #1

Updated by Hamlyn Mootoo over 7 years ago

More information:

After creating two DIFFERENT techniques, each having the same method, and creating 1 directive from each, the failure still occurs.

File contents:

options     color=blue height=99 width=5

Result:
A| non-compliant test File ensure key value pa| /tmp/test Add key non existing options with value height=4 in /tmp/test was not correct
A| non-compliant test2 File ensure key value pa| /tmp/test Add key non existing options with value width=5 in /tmp/test was not correct

Actions #2

Updated by Janos Mattyasovszky over 7 years ago

This is probably the same as #10838

Actions #3

Updated by Janos Mattyasovszky over 7 years ago

  • Is duplicate of Bug #10838: File content (Key/value pair) reports for all entries, even if only one changes added
Actions #4

Updated by Hamlyn Mootoo over 7 years ago

Although the cause might certainly be related to #10838 there is a subtle but distinct difference in behavior. In #10838, the first incorrect repair is signaled prior to evaluating the one that actually needs to be repaired. In this bug, the order definitely matters as only a prior negative (non-compliant) method status feeds through to the status of the second method. If the order is reversed (i.e. the first method's status is evaluated as successful), the second method is evaluated independently.

Actions #5

Updated by Janos Mattyasovszky over 7 years ago

The base problem is basically the same, that the reporting is only done on per-file basis, and not on per-key-in-file basis for the class file_ensure_key_value_${file}, if the reporting could be make for more than one "composite keys" (like ${file}_${key}), then each would could get a different report.

Actions #6

Updated by Hamlyn Mootoo over 7 years ago

Bug #10838 is related to method file_ensure_key_value, whereas this bug uses a different method, namely file_ensure_key_value_parameter_in_list.

Actions #8

Updated by Benoît PECCATTE about 7 years ago

  • Priority changed from 52 to 49
Actions #9

Updated by Nicolas CHARLES over 6 years ago

  • Status changed from New to Rejected
  • Priority changed from 49 to 43
Actions #10

Updated by Nicolas CHARLES over 6 years ago

  • Is duplicate of User story #12414: Make reporting work when targeting several time the same item with several generic method added
Actions

Also available in: Atom PDF