Project

General

Profile

Actions

Bug #15130

closed

Bug #15035: Avoid fetching nodeconfigurations twice when when runs processed

New directives don't show up in rules compliance nor in node details

Added by Nicolas CHARLES almost 5 years ago. Updated almost 5 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Compliance & node report
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:

Description

I created a directive, and included it in Rules Global configuration for all nodes (see screenshot)

Then, I went to Rules compliance (see screenshot) and Node details, and it wasn't there

after a while, it appears


Files

rule.png (33.3 KB) rule.png Nicolas CHARLES, 2019-06-27 10:27
directive.png (47.7 KB) directive.png Nicolas CHARLES, 2019-06-27 10:27
run_arriving.png (24.9 KB) run_arriving.png Nicolas CHARLES, 2019-06-27 10:45

Related issues 1 (1 open0 closed)

Related to Rudder - Bug #15140: If a component is added to a directive, compliance is not marked in blue as waiting for reportsNewClark ANDRIANASOLOActions
Actions #1

Updated by Nicolas CHARLES almost 5 years ago

Logs:

[2019-06-27 08:22:14] INFO  policy.generation - Save expected reports         :          1 ms
[2019-06-27 08:22:14] INFO  policy.generation - Run post generation hooks     :         24 ms
[2019-06-27 08:22:14] INFO  policy.generation - Number of nodes updated       :          2   
[2019-06-27 08:22:14] INFO  policy.generation - Policy generation completed in:        1 s
[2019-06-27 08:22:14] INFO  policy.generation - Flag file '/opt/rudder/etc/policy-update-running' successfully removed
[2019-06-27 08:22:14] INFO  policy.generation - Successful policy update '17' [started 2019-06-27 08:22:12 - ended 2019-06-27 08:22:14]
[2019-06-27 08:22:44] WARN  com.normation.cfclerk.xmlparsers.VariableSpecParser - Since Rudder 4.3, a variable can not be marked as 'UNIQUEVARIABLE' anymore and that attribute will be ignored. In place, you should use a Rudder parameter to denote an unique value, or a Node Property for a value unique for a given node. To denote an action unique to all directive derived from the same technique, you should use pre- or post-agent-run hooks
[2019-06-27 08:22:44] WARN  com.normation.cfclerk.xmlparsers.VariableSpecParser - Since Rudder 4.3, a variable can not be marked as 'UNIQUEVARIABLE' anymore and that attribute will be ignored. In place, you should use a Rudder parameter to denote an unique value, or a Node Property for a value unique for a given node. To denote an action unique to all directive derived from the same technique, you should use pre- or post-agent-run hooks
[2019-06-27 08:22:44] INFO  com.normation.cfclerk.services.impl.TechniqueRepositoryImpl - Reloading technique library, no modified techniques found
[2019-06-27 08:22:44] INFO  com.normation.rudder.services.policies.DeployOnTechniqueCallback - Automatic batch update at 2019-06-27T08:22:44.480Z

after one minute roughly it shows up

Actions #2

Updated by Nicolas CHARLES almost 5 years ago

An agent run updates the compliance

[2019-06-27 08:43:40] DEBUG report - [Store Agent Run Times #671] checking agent runs from SQL ID 1668 [2019-06-27T08:43:34.000Z - 2019-06-27T08:43:40.374Z]
[2019-06-27 08:43:40] DEBUG report - Updating agent runs cache: ['6b2b4a23-63cb-4d07-a019-843066b7a9b8' at '2019-06-27T08:43:34.000Z']
[2019-06-27 08:43:40] DEBUG report - [Store Agent Run Times #671] (6 ms) Added or updated 1 agent runs, up to SQL ID 1697 (last run time was 2019-06-27T08:43:34.000Z)

and cause the directive to appear for one node

My bet is that compliance is not correctly invalidated at the end of the policy generation

Actions #3

Updated by Nicolas CHARLES almost 5 years ago

if does says that it invalidate cache

[2019-06-27 08:59:41] DEBUG com.normation.rudder.services.reports.CachedReportingServiceImpl - Compliance cache: invalidate cache for nodes: [6b2b4a23-63cb-4d0
7-a019-843066b7a9b8,root]
[2019-06-27 08:59:41] DEBUG com.normation.rudder.services.reports.CachedReportingServiceImpl - Compliance cache miss (updated):[6b2b4a23-63cb-4d07-a019-843066b
7a9b8 , root],  hit:[]
[2019-06-27 08:59:43] DEBUG report - [Store Agent Run Times #863] checking agent runs from SQL ID 2102 [2019-06-27T08:59:38.017Z - 2019-06-27T08:59:43.024Z]
[2019-06-27 08:59:43] DEBUG report - [Store Agent Run Times #863] (2 ms) Added or updated 0 agent runs
[2019-06-27 08:59:48] DEBUG report - [Store Agent Run Times #864] checking agent runs from SQL ID 2102 [2019-06-27T08:59:43.024Z - 2019-06-27T08:59:48.030Z]
[2019-06-27 08:59:48] DEBUG report - [Store Agent Run Times #864] (1 ms) Added or updated 0 agent runs
[2019-06-27 08:59:53] DEBUG report - [Store Agent Run Times #865] checking agent runs from SQL ID 2102 [2019-06-27T08:59:48.030Z - 2019-06-27T08:59:53.033Z]
[2019-06-27 08:59:53] DEBUG report - [Store Agent Run Times #865] (1 ms) Added or updated 0 agent runs
[2019-06-27 08:59:53] DEBUG com.normation.rudder.services.reports.CachedNodeChangesServiceImpl - NodeChanges cache initialization...
[2019-06-27 08:59:53] DEBUG com.normation.rudder.services.reports.CachedNodeChangesServiceImpl - NodeChanges cache hit
[2019-06-27 08:59:53] DEBUG com.normation.rudder.services.reports.CachedReportingServiceImpl - Compliance cache miss (updated):[],  hit:[6b2b4a23-63cb-4d07-a019-843066b7a9b8 , root]
[2019-06-27 08:59:54] DEBUG com.normation.rudder.services.reports.CachedReportingServiceImpl - Compliance cache miss (updated):[],  hit:[6b2b4a23-63cb-4d07-a01:

yet, nothing seems invalidated

Actions #4

Updated by Nicolas CHARLES almost 5 years ago

this used to work in Rudder 5.0.11
regenerating all policies doesn't fix the issue

Actions #5

Updated by Nicolas CHARLES almost 5 years ago

  • Parent task set to #15035

introduced by parent ticket

Actions #6

Updated by Nicolas CHARLES almost 5 years ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
Actions #7

Updated by Nicolas CHARLES almost 5 years ago

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

Updated by Nicolas CHARLES almost 5 years ago

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

Updated by François ARMAND almost 5 years ago

The proposed fixe doesn't correct the following use case:

- create a directive "package" with "yum"
- apply
- run agents etc
- update directive "package" and add for ex vim-enhanced
=> generation is done, node configurations are maked updated, but if you go to a node compliance details, it still only have yum
- rudder agent run -u from node => compliance update with 2 packages.

Actions #10

Updated by François ARMAND almost 5 years ago

Actually, it's the same behavior than previously, so I'm ok with the correction. We need to correct that behavior in a next minor of 5.1, thought.

Actions #11

Updated by François ARMAND almost 5 years ago

  • Fix check changed from To do to Checked
Actions #12

Updated by François ARMAND almost 5 years ago

  • Related to Bug #15140: If a component is added to a directive, compliance is not marked in blue as waiting for reports added
Actions #13

Updated by Vincent MEMBRÉ almost 5 years ago

  • Status changed from Pending release to Released

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

Actions

Also available in: Atom PDF