Bug #15130
closedBug #15035: Avoid fetching nodeconfigurations twice when when runs processed
New directives don't show up in rules compliance nor in node details
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
Updated by Nicolas CHARLES over 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
Updated by Nicolas CHARLES over 5 years ago
- File run_arriving.png run_arriving.png added
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
Updated by Nicolas CHARLES over 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
Updated by Nicolas CHARLES over 5 years ago
this used to work in Rudder 5.0.11
regenerating all policies doesn't fix the issue
Updated by Nicolas CHARLES over 5 years ago
- Status changed from New to In progress
- Assignee set to Nicolas CHARLES
Updated by Nicolas CHARLES over 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
Updated by Nicolas CHARLES over 5 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|561de481d5d46dcc70e972eb1625b0c39a0277ab.
Updated by François ARMAND over 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.
Updated by François ARMAND over 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.
Updated by François ARMAND over 5 years ago
- Fix check changed from To do to Checked
Updated by François ARMAND over 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
Updated by Vincent MEMBRÉ over 5 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 5.0.12 which was released today.