Project

General

Profile

Bug #12719

Some reports are duplicated between agent and postgres leading to "unexpected" compliance

Added by François ARMAND 6 months ago. Updated 5 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Compliance & node report
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
107
Tags:

Description

We have users reporting a lot of "unexpected", for example in copy-file or enforce file content post-hook components. After analysis, there seems to be a pattern where:

- on the node side, `/var/rudder/cfengine-community/outputs/the_run_output` contains the correct reports
- in database, the corresponding reports is duplicated for that run (with non consecutive insert id)

So something happen between the agent and postgres that duplicates the messages. All our investigation let us believe it's a duplicated syslog message, which could be correlated by the fact that the network is bad on these installations.

The long terme solution is to process messages with a run atomicity, and send them on the network with an "at least once" messaging semantic (it's easy to detect a duplicated run report server side). That need major architectural changes on Rudder.

A short term workaround is to had an option to let the compliance ignores unexpected when we have exactly the same reports. The compliance detail would still display both messages, but we would use the report compliance level.

We don't forsee a lot of cases where a fully duplicated message can be produced, so in most cases it seems preferable to use that option (and remove a lot of false positives bad compliance which hurts actionnability). So we believe that the option should be on by default, but still present for people who want to be strict on non compliance level.

That option would be removed once the long term solution is available.


Related issues

Related to Rudder - Bug #7758: When several directives value have a CFEngine var, we get "unexpected" due to bad regex matchingReleased2016-01-13
Related to ncf - Bug #10769: variable_iterator use breaks reportingRejected
Has duplicate Rudder - Bug #12859: Reports from multivalued variable lead to unexpected and should notRejected

Associated revisions

Revision 953b8fc2 (diff)
Added by François ARMAND 6 months ago

Fixes #12719: Some reports are duplicated between agent and postgres leading to \"unexpected\" compliance

History

#1 Updated by François ARMAND 6 months ago

  • Status changed from New to In progress

#4 Updated by François ARMAND 6 months 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/1969

#5 Updated by François ARMAND 6 months ago

  • Related to Bug #7758: When several directives value have a CFEngine var, we get "unexpected" due to bad regex matching added

#6 Updated by Normation Quality Assistant 6 months ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Nicolas CHARLES to François ARMAND

#7 Updated by François ARMAND 6 months ago

  • Assignee changed from François ARMAND to Nicolas CHARLES

#8 Updated by Normation Quality Assistant 6 months ago

  • Assignee changed from Nicolas CHARLES to François ARMAND

#9 Updated by François ARMAND 6 months ago

  • Assignee changed from François ARMAND to Nicolas CHARLES

#10 Updated by Normation Quality Assistant 6 months ago

  • Assignee changed from Nicolas CHARLES to François ARMAND

#11 Updated by François ARMAND 6 months ago

  • Status changed from Discussion to Pending release

#12 Updated by François ARMAND 5 months ago

  • Has duplicate Bug #12859: Reports from multivalued variable lead to unexpected and should not added

#13 Updated by François ARMAND 5 months ago

  • Related to Bug #10769: variable_iterator use breaks reporting added

#14 Updated by Vincent MEMBRÉ 5 months ago

  • Status changed from Pending release to Released
  • Priority changed from 108 to 107

This bug has been fixed in Rudder 4.1.13, 4.2.7 and 4.3.3 which were released today.

Also available in: Atom PDF