Project

General

Profile

Actions

Bug #11876

closed

Architecture #10625: Don't merge directive from same technique on generation

Broken reporting in Rudder 4.3 with standard directives

Added by Nicolas CHARLES over 6 years ago. Updated about 6 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Compliance & node report
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
69
Name check:
Fix check:
Regression:

Description

I was trying a new version of CopyGitFile technique (2.2, that changes the key on which we report) with 2 directives, one that manages /tmp/foo,, directiveid a919e5df-8f6e-417d-bc7f-80f4fd9d3536 and one that managed /tmp/baz, directiveId 0056421c-66bb-45be-96ba-047fb26d95a6
I was also having multiversionned technique of this technique, in version 2.1 (dev environnement), which I later disabled, and even migrated to 2.2, to no avail

Rudder reports tells that i'm missing reporting on /tmp/baz (see screenshot), even if I get the report on this component

R: @@copyFile@@result_success@@32377fd7-02fd-43d0-aab7-28460a91347b@@0056421c-66bb-45be-96ba-047fb26d95a6@@0@@Copy file@@/tmp/baz@@2017-12-13 15:16:34+00:00##db80271f-3b98-4cc6-aaad-9cf29f31fac8@#The content of the file(s) (copied from foo/baz) is valid
R: @@copyFile@@result_error@@32377fd7-02fd-43d0-aab7-28460a91347b@@a919e5df-8f6e-417d-bc7f-80f4fd9d3536@@0@@Copy file@@/tmp/foo@@2017-12-13 15:16:34+00:00##db80271f-3b98-4cc6-aaad-9cf29f31fac8@#The content or permissions of the file(s) could not have been repaired (file not found?)
R: @@copyFile@@result_success@@32377fd7-02fd-43d0-aab7-28460a91347b@@0056421c-66bb-45be-96ba-047fb26d95a6@@0@@Post-modification hook@@/tmp/baz@@2017-12-13 15:16:34+00:00##db80271f-3b98-4cc6-aaad-9cf29f31fac8@#/tmp/baz was already in the desired state, so no command was executed
R: @@copyFile@@result_error@@32377fd7-02fd-43d0-aab7-28460a91347b@@a919e5df-8f6e-417d-bc7f-80f4fd9d3536@@0@@Post-modification hook@@/tmp/foo@@2017-12-13 15:16:34+00:00##db80271f-3b98-4cc6-aaad-9cf29f31fac8@#/tmp/foo couldn't be copied from foo/bar, so the post-hook command is not executed

Expected reports are

                                      |                          |                            |         |         {                                                      +
                                      |                          |                            |         |           "directiveId":"a919e5df-8f6e-417d-bc7f-80f4fd9d3536",+
                                      |                          |                            |         |           "isSystem":false,                                    +
                                      |                          |                            |         |           "components":[                                       +
                                      |                          |                            |         |             {                                                  +
                                      |                          |                            |         |               "componentName":"Copy file",                     +
                                      |                          |                            |         |               "cardinality":2,                                 +
                                      |                          |                            |         |               "values":[                                       +
                                      |                          |                            |         |                 "/tmp/foo",                                    +
                                      |                          |                            |         |                 "/tmp/baz"                                     +
                                      |                          |                            |         |               ],                                               +
                                      |                          |                            |         |               "unexpanded":[                                   +
                                      |                          |                            |         |                 "/tmp/foo",                                    +
                                      |                          |                            |         |                 "/tmp/baz"                                     +
                                      |                          |                            |         |               ]                                                +
                                      |                          |                            |         |             } 
                                      |                          |                            |         |         {                                                      +
                                      |                          |                            |         |           "directiveId":"a919e5df-8f6e-417d-bc7f-80f4fd9d3536",+
                                      |                          |                            |         |           "isSystem":false,                                    +
                                      |                          |                            |         |           "components":[                                       +
                                      |                          |                            |         |             {                                                  +
                                      |                          |                            |         |               "componentName":"Copy file",                     +
                                      |                          |                            |         |               "cardinality":2,                                 +
                                      |                          |                            |         |               "values":[                                       +
                                      |                          |                            |         |                 "/tmp/foo",                                    +
                                      |                          |                            |         |                 "/tmp/baz"                                     +
                                      |                          |                            |         |               ],                                               +
                                      |                          |                            |         |               "unexpanded":[                                   +
                                      |                          |                            |         |                 "/tmp/foo",                                    +
                                      |                          |                            |         |                 "/tmp/baz"                                     +
                                      |                          |                            |         |               ]                                                +
                                      |                          |                            |         |             } 

as if they are both in the same directive !


Files

Capture du 2017-12-13 16-18-49.png (62.4 KB) Capture du 2017-12-13 16-18-49.png report Nicolas CHARLES, 2017-12-13 16:19
Capture du 2017-12-13 16-20-16.png (183 KB) Capture du 2017-12-13 16-20-16.png /tmp/baz Nicolas CHARLES, 2017-12-13 16:20
Capture du 2017-12-13 16-20-49.png (194 KB) Capture du 2017-12-13 16-20-49.png /tmp/foo Nicolas CHARLES, 2017-12-13 16:20

Subtasks 2 (0 open2 closed)

Bug #11995: Error when deserializing JSON for expected node configuration in Rudder 4.3ReleasedNicolas CHARLESActions
Bug #12003: Error when deserializing JSON for expected node configuration in Rudder 4.3ReleasedNicolas CHARLESActions
Actions #1

Updated by Nicolas CHARLES over 6 years ago

On a 4.2 server, I have the correct expected report

        |                          |                           |         |         {                                                                    +
        |                          |                           |         |           "directiveId":"fcfd59d3-473a-4551-bf4d-0e2630be3b54",              +
        |                          |                           |         |           "isSystem":false,                                                  +
        |                          |                           |         |           "components":[                                                     +
        |                          |                           |         |             {                                                                +
        |                          |                           |         |               "componentName":"Copy file",                                   +
        |                          |                           |         |               "cardinality":1,                                               +
        |                          |                           |         |               "values":[                                                     +
        |                          |                           |         |                 "/tmp/baz"                                                   +
        |                          |                           |         |               ],                                                             +
        |                          |                           |         |               "unexpanded":[                                                 +
        |                          |                           |         |                 "/tmp/baz"                                                   +
        |                          |                           |         |               ]                                                              +
        |                          |                           |         |             }                                                                +
        |                          |                           |         |           ]                                                                  +
        |                          |                           |         |         },                                                                   +
        |                          |                           |         |         {                                                                    +
        |                          |                           |         |           "directiveId":"fcfd59d3-473a-4551-bf4d-0e2630be3b54",              +
        |                          |                           |         |           "isSystem":false,                                                  +
        |                          |                           |         |           "components":[                                                     +
        |                          |                           |         |             {                                                                +
        |                          |                           |         |               "componentName":"Post-modification hook",                      +
        |                          |                           |         |               "cardinality":1,                                               +
        |                          |                           |         |               "values":[                                                     +
        |                          |                           |         |                 "/tmp/baz"                                                   +
        |                          |                           |         |               ],                                                             +
        |                          |                           |         |               "unexpanded":[                                                 +
        |                          |                           |         |                 "/tmp/baz"                                                   +
        |                          |                           |         |               ]                                                              +
        |                          |                           |         |             }                                                                +
        |                          |                           |         |           ]                                                                  +
        |                          |                           |         |         },   
        |                          |                           |         |         {                                                                    +
        |                          |                           |         |           "directiveId":"fd70d184-5eb8-4098-b516-83be57fa96ad",              +
        |                          |                           |         |           "isSystem":false,                                                  +
        |                          |                           |         |           "components":[                                                     +
        |                          |                           |         |             {                                                                +
        |                          |                           |         |               "componentName":"Copy file",                                   +
        |                          |                           |         |               "cardinality":1,                                               +
        |                          |                           |         |               "values":[                                                     +
        |                          |                           |         |                 "/tmp/bar"                                                   +
        |                          |                           |         |               ],                                                             +
        |                          |                           |         |               "unexpanded":[                                                 +
        |                          |                           |         |                 "/tmp/bar"                                                   +
        |                          |                           |         |               ]                                                              +
        |                          |                           |         |             }                                                                +
        |                          |                           |         |           ]                                                                  +
        |                          |                           |         |         },                                                                   +
        |                          |                           |         |         {                                                                    +
        |                          |                           |         |           "directiveId":"fd70d184-5eb8-4098-b516-83be57fa96ad",              +
        |                          |                           |         |           "isSystem":false,                                                  +
        |                          |                           |         |           "components":[                                                     +
        |                          |                           |         |             {                                                                +
        |                          |                           |         |               "componentName":"Post-modification hook",                      +
        |                          |                           |         |               "cardinality":1,                                               +
        |                          |                           |         |               "values":[                                                     +
        |                          |                           |         |                 "/tmp/bar"                                                   +
        |                          |                           |         |               ],                                                             +
        |                          |                           |         |               "unexpanded":[                                                 +
        |                          |                           |         |                 "/tmp/bar"                                                   +
        |                          |                           |         |               ]                                                              +
        |                          |                           |         |             }                                                                +
        |                          |                           |         |           ]                                                                  +

Actions #2

Updated by François ARMAND over 6 years ago

  • Severity set to Major - prevents use of part of Rudder | no simple workaround
  • User visibility set to Getting started - demo | first install | level 1 Techniques
  • Priority changed from 0 to 70

There is something broken with expected reports generation, most likely following #10625

Actions #3

Updated by François ARMAND about 6 years ago

  • Related to Architecture #10625: Don't merge directive from same technique on generation added
Actions #4

Updated by François ARMAND about 6 years ago

  • Status changed from New to In progress
Actions #6

Updated by François ARMAND about 6 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder/pull/1824
Actions #7

Updated by Rudder Quality Assistant about 6 years ago

  • Assignee changed from Nicolas CHARLES to François ARMAND
Actions #8

Updated by François ARMAND about 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #9

Updated by Benoît PECCATTE about 6 years ago

  • Subject changed from Broken reporting in Rudder 4.3 with standart directives to Broken reporting in Rudder 4.3 with standard directives
Actions #10

Updated by François ARMAND about 6 years ago

  • Related to Bug #11995: Error when deserializing JSON for expected node configuration in Rudder 4.3 added
Actions #11

Updated by Vincent MEMBRÉ about 6 years ago

  • Related to deleted (Bug #11995: Error when deserializing JSON for expected node configuration in Rudder 4.3)
Actions #12

Updated by Vincent MEMBRÉ about 6 years ago

  • Related to deleted (Architecture #10625: Don't merge directive from same technique on generation)
Actions #13

Updated by Vincent MEMBRÉ about 6 years ago

  • Parent task set to #10625
  • Priority changed from 70 to 69
Actions #14

Updated by Vincent MEMBRÉ about 6 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.3.0~beta1 which was released today.

Actions

Also available in: Atom PDF