Project

General

Profile

Actions

Bug #21730

closed

on a fresh 7.1 install, the number of group displayed for "Global configuration of all nodes" is invalid

Added by Nicolas CHARLES 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:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

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

Actions #1

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

Actions #2

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)

Actions #3

Updated by Elaad FURREEDAN about 2 years ago

  • Status changed from New to In progress
  • Assignee set to Elaad FURREEDAN
Actions #4

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
Actions #5

Updated by Anonymous about 2 years ago

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

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 1002 to 7.1.7
Actions #7

Updated by Vincent MEMBRÉ about 2 years ago

  • Fix check changed from To do to Checked
Actions #8

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.

Actions

Also available in: Atom PDF