Project

General

Profile

Actions

Bug #3767

closed

With the API, it is possible to set a Group with no criteria

Added by Nicolas PERRON over 7 years ago. Updated over 6 years ago.

Status:
Released
Priority:
3
Category:
API
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

With the API, it is possible to set a Group as having no criteria.

root@rudder-snapshot:~# curl -H "X-API-Token:ACnxAtsckQGGQN40MuGavq6wNHMMpqM5" -H "X-API-Version: 2" -X GET http://localhost/rudder/api/groups/5046d372-3717-4e8d-b417-94c3e1dc8628?prettify=true 
{
  "action":"groupDetails",
  "id":"5046d372-3717-4e8d-b417-94c3e1dc8628",
  "result":"success",
  "data":{
    "groups":[{
      "id":"5046d372-3717-4e8d-b417-94c3e1dc8628",
      "displayName":"Super group",
      "description":"",
      "query":{
        "select":"nodeAndPolicyServer",
        "composition":"And",
        "where":[{
          "objectType":"node",
          "attribute":"OS",
          "comparator":"eq",
          "value":"Linux" 
        }]
      },
      "nodeIds":["root"],
      "isDynamic":true,
      "isEnabled":true
    }]
  }
root@rudder-snapshot:~# curl -H "X-API-Token:ACnxAtsckQGGQN40MuGavq6wNHMMpqM5" -H "X-API-Version: 2" -X POST http://localhost/rudder/api/groups/5046d372-3717-4e8d-b417-94c3e1dc8628?prettify=true 
{
  "action":"updateGroup",
  "id":"5046d372-3717-4e8d-b417-94c3e1dc8628",
  "result":"success",
  "data":{
    "groups":[{
      "id":"5046d372-3717-4e8d-b417-94c3e1dc8628",
      "displayName":"Super group",
      "description":"",
      "nodeIds":["root"],
      "isDynamic":true,
      "isEnabled":true
    }]
  }
Actions #1

Updated by Nicolas PERRON over 7 years ago

  • Target version changed from 2.7.0~beta1 to 2.7.0~rc1
Actions #2

Updated by Nicolas PERRON over 7 years ago

  • Target version changed from 2.7.0~rc1 to 2.7.0
Actions #3

Updated by Vincent MEMBRÉ over 7 years ago

The group is correctly created and has no nodes in it.

Reload keeps the group empty.

When affected to a RUles, it's like nothing happenned (the Rule is not applied to any nodes)

When looking to the group, it displays the search form with the basic query (node -> system type -> Linux) but without any nodes

I dont think this is a problem, and at least it not blocking for 2.7.0 release

Actions #4

Updated by Nicolas PERRON over 7 years ago

  • Target version changed from 2.7.0 to 2.7.1
Actions #5

Updated by Nicolas PERRON over 7 years ago

  • Target version changed from 2.7.1 to 2.7.2
Actions #6

Updated by Nicolas PERRON over 7 years ago

  • Target version changed from 2.7.2 to 2.7.3
Actions #7

Updated by Nicolas PERRON over 7 years ago

  • Target version changed from 2.7.3 to 2.7.4
Actions #8

Updated by Nicolas PERRON over 7 years ago

  • Target version changed from 2.7.4 to 2.7.5
Actions #9

Updated by Nicolas PERRON over 7 years ago

  • Target version changed from 2.7.5 to 2.7.6
Actions #10

Updated by Nicolas PERRON over 7 years ago

  • Target version changed from 2.7.6 to 2.7.7
Actions #11

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 2.7.7 to 2.7.8
Actions #12

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 2.7.8 to 2.8.3

Since 2.7.* is not supported anymore, targeting in 2.8

Actions #13

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 2.8.3 to 2.8.4
Actions #14

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 2.8.4 to 133
Actions #15

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 133 to 2.9.5
Actions #16

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 2.9.5 to 2.9.6
Actions #17

Updated by Jonathan CLARKE almost 7 years ago

  • Target version changed from 2.9.6 to 2.9.7
Actions #18

Updated by Jonathan CLARKE almost 7 years ago

  • Target version changed from 2.9.7 to 150
Actions #19

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 150 to 2.10.4
Actions #20

Updated by Nicolas PERRON over 6 years ago

  • Target version changed from 2.10.4 to 2.10.5
Actions #21

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 2.10.5 to 2.10.6
Actions #22

Updated by Matthieu CERDA over 6 years ago

  • Target version changed from 2.10.6 to 2.10.7
Actions #23

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 2.10.7 to 2.10.8
Actions #24

Updated by Jonathan CLARKE over 6 years ago

  • Target version changed from 2.10.8 to 3.0.0~beta2

We should refuse to create a group without criteria. This must be in a new API version.

Actions #25

Updated by Vincent MEMBRÉ over 6 years ago

  • Status changed from New to Pending technical review
  • Assignee set to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/690
Actions #26

Updated by Vincent MEMBRÉ over 6 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #28

Updated by Vincent MEMBRÉ over 6 years ago

  • Subject changed from With the API, it is possible to set Group without any criteria to With the API, it is possible to set a Group with no criteria
Actions #29

Updated by Vincent MEMBRÉ over 6 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.0.0~beta2, which were these days.

Actions

Also available in: Atom PDF