Bug #21730
closedon a fresh 7.1 install, the number of group displayed for "Global configuration of all nodes" is invalid
Description
It shows +2-2
If I add a directives in audit mode; it beome "mixed" rather than "audit"
Happen in 7.0 and 7.1
Files
Updated by Elaad FURREEDAN over 2 years ago
for the bug of the label "mixed" see https://issues.rudder.io/issues/21731
We can reset the wrong numbers by editing the list of group one time. After that the count is reset and the bug no longer appear.
This bug does not affect rules created by user by only the default rule Global configuration for all nodes
Updated by Elaad FURREEDAN about 2 years ago
This only affect "Global configuration of all nodes" introduce by https://issues.rudder.io/issues/21546
API response for "Global configuration of all nodes":
{ "action": "ruleDetails", "id": "32377fd7-02fd-43d0-aab7-28460a91347b", "result": "success", "data": { "rules": [ { "id": "32377fd7-02fd-43d0-aab7-28460a91347b", "displayName": "Global configuration for all nodes", ... "targets": [ "special:all" ], ... } ] } }
The parameter target
doesn't contains include
and exclude
group in "Global configuration of all nodes", but when we create a new rule:
{ "action": "ruleDetails", "id": "a438c450-c095-4d22-9341-b151199f5346", "result": "success", "data": { "rules": [ { "id": "a438c450-c095-4d22-9341-b151199f5346", "displayName": "Rule created by user", ... "targets": [ { "include": { "or": [ "special:all" ] }, "exclude": { "or": [] } } ], ... } ] } }
So in Elm code, we cannot differentiate exclude and include groups for the target, so it appears in both exclude and include
Why this is +2 and -2 ?
Because `getDiffGroups` function in elm count 2 switchs:
1. One switch for special:all
group from exclude to include (+1, -1)
2. Another one special:all
from include to exclude (+2, -2)
Updated by Elaad FURREEDAN about 2 years ago
- Status changed from New to In progress
- Assignee set to Elaad FURREEDAN
Updated by Elaad FURREEDAN about 2 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Elaad FURREEDAN to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/4489
Updated by Anonymous about 2 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|c28cf10eabb711ce1852c9161c2320862fbcd999.
Updated by Vincent MEMBRÉ about 2 years ago
- Target version changed from 1002 to 7.1.7
Updated by Vincent MEMBRÉ about 2 years ago
- Fix check changed from To do to Checked
Updated by Vincent MEMBRÉ about 2 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 7.1.7 and 7.2.1 which were released today.