Bug #6619
closedBug #6519: When we add a node in a rule, we lose all compliance info on this rule applied on it, and we change promises of all the nodes of the rule
When only adding directives to Rules, reporting is not displayed for added directives
Description
Let say I have a Rule with 2 Directives d1 and d2 and with reporting display is ok
If i remove d2, reporting is still ok
Then if i add back d2 => reporting will be wrong, only displaying d1
This is because expected reports for our rule were not updated! in the deployment process we ignore cases where a a directive was added and don't consider the Rule was updated (and we don't upgrade its serial keep using old version)
We should consider this as an update for the Rule, adding this fix all issues
Updated by Vincent MEMBRÉ over 9 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Vincent MEMBRÉ to François ARMAND
- Pull Request set to https://github.com/Normation/rudder/pull/862
Updated by Nicolas CHARLES over 9 years ago
- Related to Bug #6519: When we add a node in a rule, we lose all compliance info on this rule applied on it, and we change promises of all the nodes of the rule added
Updated by François ARMAND over 9 years ago
- Status changed from Pending technical review to In progress
I'm coming with an other solution that leads to the following debug log when adding a node to Rudder where one rule is applied to all node via dyngroup: we see that it's serial is not updated, but nonetheless, expected reports are closed & reopen. The promises are correctly generated on the fs for the node.
Notice that if the rule includes directive with at least one system variable (and several directives are using NOVA sys variable to do things on windows), then the serial WILL BE UPDATED, because we don't have the granularity to distinguish today which sysvar was changed, and adding a node do change other sysvars.
[2015-05-22 12:26:52] INFO com.normation.rudder.services.policies.DeploymentServiceImpl - Start policy generation, checking updated rules [2015-05-22 12:26:52] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - All relevant information fetched in 146ms, start names historization. [2015-05-22 12:26:52] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Historization of names done in 123ms, start to build rule values. [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.RuleValServiceImpl - Creating a DirectiveVal inventory from the ruleId inventory-all [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.RuleValServiceImpl - Creating a DirectiveVal server-roles from the ruleId server-roles [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.RuleValServiceImpl - Creating a DirectiveVal distributePolicy from the ruleId root-DP [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.RuleValServiceImpl - Creating a DirectiveVal common from the ruleId hasPolicyServer-root [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.RuleValServiceImpl - Creating a DirectiveVal motdConfiguration from the ruleId 2278f76f-28d3-4326-8199-99561dd8c785 [2015-05-22 12:26:52] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - RuleVals built in 3ms, start to expand their values. [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.SystemVariableServiceImpl - Preparing the global system variables [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.SystemVariableServiceImpl - Global system variables done [2015-05-22 12:26:52] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Global system variables built in 176ms, start to build new node configurations. [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.SystemVariableServiceImpl - Preparing the system variables for node root [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.SystemVariableServiceImpl - System variables for node root done [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.SystemVariableServiceImpl - Preparing the system variables for node 729be5c4-55a2-4b97-8529-5154cbb63a18 [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.SystemVariableServiceImpl - System variables for node 729be5c4-55a2-4b97-8529-5154cbb63a18 done [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.SystemVariableServiceImpl - Preparing the system variables for node 0876521e-3c81-4775-85c7-5dd7f9d5d3da [2015-05-22 12:26:52] TRACE com.normation.rudder.services.policies.SystemVariableServiceImpl - System variables for node 0876521e-3c81-4775-85c7-5dd7f9d5d3da done [2015-05-22 12:26:52] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Node's target configuration built in 8, start to update rule values. [2015-05-22 12:26:54] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - RuleVals updated in 1856 millisec, start to detect changes in node configuration. [2015-05-22 12:26:54] TRACE com.normation.rudder.services.policies.nodeconfig.DetectChangeInNodeConfiguration - Checking changes in node 'root' << here we see that the rule 2278f76f-28d3-4326-8199-99561dd8c785 is not updated because it don't have system variables [2015-05-22 12:26:55] TRACE com.normation.rudder.services.policies.nodeconfig.DetectChangeInNodeConfiguration - `-> there was a change in the system variables of the node for rules ID [server-roles, hasPolicyServer-root, root-DP, inventory-all] >> [2015-05-22 12:26:55] TRACE com.normation.rudder.services.policies.nodeconfig.DetectChangeInNodeConfiguration - `-> modified rules: [server-roles, hasPolicyServer-root, root-DP, inventory-all] [2015-05-22 12:26:55] TRACE com.normation.rudder.services.policies.nodeconfig.DetectChangeInNodeConfiguration - Checking changes in node '729be5c4-55a2-4b97-8529-5154cbb63a18' [2015-05-22 12:26:55] TRACE com.normation.rudder.services.policies.nodeconfig.DetectChangeInNodeConfiguration - `-> modified rules: [] [2015-05-22 12:26:55] TRACE com.normation.rudder.services.policies.nodeconfig.DetectChangeInNodeConfiguration - Checking changes in node '0876521e-3c81-4775-85c7-5dd7f9d5d3da' [2015-05-22 12:26:56] TRACE com.normation.rudder.services.policies.nodeconfig.DetectChangeInNodeConfiguration - `-> No node configuration cache availabe for that node [2015-05-22 12:26:56] TRACE com.normation.rudder.services.policies.nodeconfig.DetectChangeInNodeConfiguration - `-> modified rules: [] [2015-05-22 12:26:56] TRACE com.normation.rudder.services.policies.DeploymentServiceImpl - Updating rule server-roles to serial 40 [2015-05-22 12:26:56] TRACE com.normation.rudder.services.policies.DeploymentServiceImpl - Updating rule hasPolicyServer-root to serial 45 [2015-05-22 12:26:56] TRACE com.normation.rudder.services.policies.DeploymentServiceImpl - Updating rule root-DP to serial 40 [2015-05-22 12:26:56] TRACE com.normation.rudder.services.policies.DeploymentServiceImpl - Updating rule inventory-all to serial 45 [2015-05-22 12:26:56] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Checked node configuration updates leading to rules serial number updates and serial number updated in 1793ms [2015-05-22 12:26:59] WARN com.normation.rudder.services.policies.RudderCf3PromisesFileWriterServiceImpl - Failed to reload CFEngine server promises with command "/usr/bin/killall -SIGHUP cf-serverd"" - cause is cf-serverd": aucun processus trouvé [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Node configuration written on filesystem in 3022 millisec. [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Node configuration cached in LDAP in 123 millisec. [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Node configuration written in 3588ms, start to update expected reports. [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.reports.ReportingServiceImpl - Serial number (44) for expected reports for rule 'inventory-all' was changed: update expected reports for that rule [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.reports.ReportingServiceImpl - Serial number (39) for expected reports for rule 'server-roles' was changed: update expected reports for that rule [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.reports.ReportingServiceImpl - Serial number (39) for expected reports for rule 'root-DP' was changed: update expected reports for that rule [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.reports.ReportingServiceImpl - Serial number (44) for expected reports for rule 'hasPolicyServer-root' was changed: update expected reports for that rule [2015-05-22 12:26:59] TRACE com.normation.rudder.services.reports.ReportingServiceImpl - Serial number (24) for expected reports for rule '2278f76f-28d3-4326-8199-99561dd8c785' was not changed and cache up-to-date: nothing to do << here we see that the serial is not updated [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.reports.ReportingServiceImpl - Same serial 24 for ruleId 2278f76f-28d3-4326-8199-99561dd8c785, but not same node set, it need to be closed and created >> [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.reports.ReportingServiceImpl - Closing expected reports for rules: [server-roles, root-DP, inventory-all, 2278f76f-28d3-4326-8199-99561dd8c785, hasPolicyServer-root] [2015-05-22 12:26:59] DEBUG com.normation.rudder.repository.jdbc.RuleExpectedReportsJdbcRepository - Closing expected report for rules 'server-roles' << but nonetheless, the report are closed and open [2015-05-22 12:26:59] DEBUG com.normation.rudder.repository.jdbc.RuleExpectedReportsJdbcRepository - Closing expected report for rules '2278f76f-28d3-4326-8199-99561dd8c785' >> [2015-05-22 12:26:59] DEBUG com.normation.rudder.repository.jdbc.RuleExpectedReportsJdbcRepository - Closing expected report for rules 'inventory-all' [2015-05-22 12:26:59] DEBUG com.normation.rudder.repository.jdbc.RuleExpectedReportsJdbcRepository - Closing expected report for rules 'root-DP' [2015-05-22 12:26:59] DEBUG com.normation.rudder.repository.jdbc.RuleExpectedReportsJdbcRepository - Closing expected report for rules 'hasPolicyServer-root' [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.reports.ReportingServiceImpl - Updating expected reports for rules: [server-roles, hasPolicyServer-root, 2278f76f-28d3-4326-8199-99561dd8c785, root-DP, inventory-all] [2015-05-22 12:26:59] DEBUG com.normation.rudder.repository.jdbc.RuleExpectedReportsJdbcRepository - Saving expected report for rule server-roles [2015-05-22 12:26:59] DEBUG com.normation.rudder.repository.jdbc.RuleExpectedReportsJdbcRepository - Saving expected report for rule hasPolicyServer-root << [2015-05-22 12:26:59] DEBUG com.normation.rudder.repository.jdbc.RuleExpectedReportsJdbcRepository - Saving expected report for rule 2278f76f-28d3-4326-8199-99561dd8c785 >> [2015-05-22 12:26:59] DEBUG com.normation.rudder.repository.jdbc.RuleExpectedReportsJdbcRepository - Saving expected report for rule root-DP [2015-05-22 12:26:59] DEBUG com.normation.rudder.repository.jdbc.RuleExpectedReportsJdbcRepository - Saving expected report for rule inventory-all [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Reports updated in 156ms [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Timing summary: [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Fetch all information : 146 ms [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Historize names : 123 ms [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Build current rule values : 3 ms [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Build target configuration: 8 ms [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Update rule vals : 1856 ms [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Increment rule serials : 1793 ms [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Write node configurations : 3588 ms [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Save expected reports : 156 ms [2015-05-22 12:26:59] DEBUG com.normation.rudder.services.policies.DeploymentServiceImpl - Policy generation completed in 7853 millisec [2015-05-22 12:26:59] INFO com.normation.rudder.batch.AsyncDeploymentAgent - Successful policy update '42' [started 2015-05-22 12:26:52 - ended 2015-05-22 12:26:59] /<pre>
Updated by François ARMAND over 9 years ago
- Pull Request changed from https://github.com/Normation/rudder/pull/862 to https://github.com/Normation/rudder/pull/864
New PR is here: https://github.com/Normation/rudder/pull/864
Updated by François ARMAND over 9 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Nicolas CHARLES
Updated by Vincent MEMBRÉ over 9 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder|c68240df4da584f9196a0b9c272dcc01f9780a8e.
Updated by Nicolas CHARLES over 9 years ago
Applied in changeset rudder|01466264f567ee090029454dd7982b6b9481e86c.
Updated by Vincent MEMBRÉ over 9 years ago
- Related to deleted (Bug #6519: When we add a node in a rule, we lose all compliance info on this rule applied on it, and we change promises of all the nodes of the rule)
Updated by Vincent MEMBRÉ over 9 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.11.11 and 3.0.5 which were released today.
- Announcement 2.11
- Changelog 2.11 3.0
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/