Bug #17476
closedBug #17421: Add log about node group update failure because of inconsistency
error about group consistency at upgrade from Rudder 6.0 to 6.1
Added by Nicolas CHARLES over 4 years ago. Updated over 4 years ago.
Description
parent ticket introduce logs, so that we can know what's going one
Files
clipboard-202006022046-pxzwz.png (12.7 KB) clipboard-202006022046-pxzwz.png | François ARMAND, 2020-06-02 20:46 |
Updated by Nicolas CHARLES over 4 years ago
could not reproduce
rejecting, will reopen if it still happen
Updated by Nicolas CHARLES over 4 years ago
- Status changed from Rejected to New
- Target version changed from 6.1.0~rc1 to 6.1.0~rc2
it still happens
[2020-05-28 09:54:19+0200] ERROR scheduled.job - Error when updating dynamic group 'all-nodes-with-cfengine-agent' <- Error when saving update for dynamic group 'All classic Nodes' (all-nodes-with-cfengine-agent) <- Consistancy: The group configuration changed compared to the reference group you want to change the node list for. Aborting to preserve consistency
Updated by Nicolas CHARLES over 4 years ago
log in parent ticket doesn't work
when making it work, it says
Inconsistency when modifying node lists for nodeGroup All classic Nodes managed by root policy server: previous content was NodeGroup(NodeGroupId(hasPolicyServer-root),All classic Nodes managed by root policy server,All classic Nodes known by Rudder directly connected to the root server. This group exists only as internal purpose and should not be used to configure nodes.,List(),Some({ returnType:'NodeAndPolicyServerReturnType' with 'And' criteria [node.policyServerId eq root ; node.agentName eq cfengine] }),true,Set(NodeId(e8546e25-e5a7-4f82-bc51-eca5e568413c), NodeId(root)),true,true), new is NodeGroup(NodeGroupId(hasPolicyServer-root),All classic Nodes managed by root policy server,All classic Nodes known by Rudder directly connected to the root server. This group exists only as internal purpose and should not be used to configure nodes.,List(),Some({ returnType:'NodeAndPolicyServerReturnType' with 'And' criteria [node.policyServerId eq root ; node.agentName eq cfengine] }),true,Set(NodeId(e8546e25-e5a7-4f82-bc51-eca5e568413c), NodeId(root)),true,false) - only the node list should change
difference is in the last value: true vs false for isSystem
surprisingly, this is random
Updated by Nicolas CHARLES over 4 years ago
i don't understand how the status can differ
Updated by François ARMAND over 4 years ago
I see - the field that change is the last boolean, which is isSystem
(see code). This one has a default value, so somewhere we are saving a system group without specifying it. It's a good idea to have that protection in place.
Default parameters are evil.
Updated by François ARMAND over 4 years ago
Hum, the only case where we use that default parameter seems to be for clone or group creation via ui/api - unlikely the problem for that group.
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 6.1.0~rc2 to 6.1.0~rc3
Updated by François ARMAND over 4 years ago
- Status changed from New to In progress
- Assignee set to François ARMAND
Updated by François ARMAND over 4 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/3033
Updated by Nicolas CHARLES over 4 years ago
- Related to User story #16347: Group properties added
Updated by François ARMAND over 4 years ago
For posterity: we were forgetting to save the "isSystem" status, so corresponding attribute was deleted in ldap, and when read back, it was missing and defaulted to false (but only on one method, so once saved again it was their).
To reproduce:
- check that group "isSystem" is set to true in ldap or change its value to true otherwise,
- change some node agent from "community" to anything else,
- reload dyngroup
=> isSystem is now to false in entry.
Updated by François ARMAND over 4 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|bbaad346b3333319f05b512880d85f1b8915e0ea.
Updated by Vincent MEMBRÉ over 4 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 6.1.0~rc3 which was released today.
Updated by François ARMAND over 4 years ago
- Fix check changed from To do to Checked