Project

General

Profile

Actions

Bug #20460

closed

Invalid attribute 'special:all_servers_with_role' (or special:all_nodes_without_role) for entry ruleTarget

Added by François ARMAND over 2 years ago. Updated about 2 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:

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.


Related issues 2 (1 open1 closed)

Related to Rudder - Bug #20479: error in webapp log at start, and group allPolicyServers not showing up in group treeReleasedElaad FURREEDANActions
Related to Change validation - Bug #23446: Change request on special:all_nodes_without_role lead to errorPending releaseVincent MEMBRÉActions
Actions

Also available in: Atom PDF