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 11 months ago. Updated 10 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
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 1 (0 open1 closed)

Related to Rudder - Bug #20479: error in webapp log at start, and group allPolicyServers not showing up in group treeReleasedElaad FURREEDANActions
Actions #1

Updated by François ARMAND 11 months ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #2

Updated by François ARMAND 11 months 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
Actions #3

Updated by François ARMAND 11 months ago

  • Status changed from Pending technical review to Pending release
Actions #4

Updated by Nicolas CHARLES 11 months ago

  • Related to Bug #20479: error in webapp log at start, and group allPolicyServers not showing up in group tree added
Actions #5

Updated by Vincent MEMBRÉ 10 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 7.0.0~rc3 which was released today.

Actions

Also available in: Atom PDF