Bug #20460
closedInvalid attribute 'special:all_servers_with_role' (or special:all_nodes_without_role) for entry ruleTarget
Description
After migration to 7.0, we get error about the removed role-related special target (special:all_nodes_without_role
or special:all_servers_with_role
), like:
[2021-12-08 17:15:24+0100] ERROR rudder-ldap-entity-mapper - Invalid attribute 'special:all_servers_with_role' for entry ruleTarget. [2021-12-08 17:15:24+0100] WARN com.normation.rudder.repository.ldap.RoLDAPNodeGroupRepository - Error when mapping entry with DN 'ruleTarget=special:all_servers_with_role,groupCategoryId=SystemGroups,groupCategoryId=GroupRoot,ou=Rudder,cn=rudder-configuration' from node groups library, that entry will be ignored; cause was: UnexpectedObject: Can not unserialize target, 'special:all_servers_with_role' does not match any known target format [2021-12-08 17:15:24+0100] ERROR com.normation.rudder.domain.policies.RuleTarget - Error when trying to read the following serialized Rule target as a composite target: 'special:all_nodes_without_role'. Reported parsing error cause was: unknown token s Near: sp [2021-12-08 17:15:24+0100] WARN com.normation.rudder.repository.ldap.RoLDAPNodeGroupRepository - Error when mapping entry with DN 'ruleTarget=special:all_nodes_without_role,groupCategoryId=SystemGroups,groupCategoryId=GroupRoot,ou=Rudder,cn=rudder-configuration' from node groups library, that entry will be ignored; cause was: UnexpectedObject: Can not unserialize target, 'special:all_nodes_without_role' does not match any known target format
And:
[2021-12-20 21:50:21+0100] ERROR com.normation.rudder.domain.policies.RuleTarget - Error when trying to read the following serialized Rule target as a composite target: 'special:all_nodes_without_role'. Reported parsing error cause was: unknown token s Near: sp [2021-12-20 21:50:21+0100] ERROR rudder-ldap-entity-mapper - Invalid attribute '{"include":{"or":["group:f0e24e0a-1900-4d07-977d-da12db681abd","policyServer:root","special:all_nodes_without_role"]},"exclude":{"or":["group:all-nodes-with-dsc-agent"]}}' for entry ruleTarget.
There is likely two problems:
- the special targets are read before they are suppressed, so we don't know them anymore: they should be ignored.
- if the target was used in a rule, it will lead to second error telling that the special target is not known => we need to migrated these case.
For migration:
- special:all_nodes_without_role
can be migrated to special:all_exceptPolicyServers
since only policy servers had roles
- special:all_servers_with_role
can be migrated to a new special:all_policyServers
target - there is no reason it doesn't exist I think.
Updated by François ARMAND almost 3 years ago
- Status changed from New to In progress
- Assignee set to François ARMAND
Updated by François ARMAND almost 3 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/4065
Updated by François ARMAND almost 3 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|388c14a1445ef14377ba6b1392d9af2610272bbc.
Updated by Nicolas CHARLES almost 3 years ago
- Related to Bug #20479: error in webapp log at start, and group allPolicyServers not showing up in group tree added
Updated by Vincent MEMBRÉ over 2 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 7.0.0~rc3 which was released today.
Updated by Elaad FURREEDAN about 1 year ago
- Related to Bug #23446: Change request on special:all_nodes_without_role lead to error added