Project

General

Profile

Actions

Bug #3767

closed

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

Bug #3767: With the API, it is possible to set a Group with no criteria

Added by Nicolas PERRON almost 13 years ago. Updated over 11 years ago.

Status:
Released
Priority:
3
Category:
API
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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
    }]
  }

Updated by Nicolas PERRON almost 13 years ago Actions #1

  • Target version changed from 2.7.0~beta1 to 2.7.0~rc1

Updated by Nicolas PERRON almost 13 years ago Actions #2

  • Target version changed from 2.7.0~rc1 to 2.7.0

Updated by Vincent MEMBRÉ almost 13 years ago Actions #3

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

Updated by Nicolas PERRON almost 13 years ago Actions #4

  • Target version changed from 2.7.0 to 2.7.1

Updated by Nicolas PERRON over 12 years ago Actions #5

  • Target version changed from 2.7.1 to 2.7.2

Updated by Nicolas PERRON over 12 years ago Actions #6

  • Target version changed from 2.7.2 to 2.7.3

Updated by Nicolas PERRON over 12 years ago Actions #7

  • Target version changed from 2.7.3 to 2.7.4

Updated by Nicolas PERRON over 12 years ago Actions #8

  • Target version changed from 2.7.4 to 2.7.5

Updated by Nicolas PERRON over 12 years ago Actions #9

  • Target version changed from 2.7.5 to 2.7.6

Updated by Nicolas PERRON over 12 years ago Actions #10

  • Target version changed from 2.7.6 to 2.7.7

Updated by Vincent MEMBRÉ over 12 years ago Actions #11

  • Target version changed from 2.7.7 to 2.7.8

Updated by Vincent MEMBRÉ over 12 years ago Actions #12

  • Target version changed from 2.7.8 to 2.8.3

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

Updated by Vincent MEMBRÉ about 12 years ago Actions #13

  • Target version changed from 2.8.3 to 2.8.4

Updated by Vincent MEMBRÉ about 12 years ago Actions #14

  • Target version changed from 2.8.4 to 133

Updated by Vincent MEMBRÉ about 12 years ago Actions #15

  • Target version changed from 133 to 2.9.5

Updated by Vincent MEMBRÉ almost 12 years ago Actions #16

  • Target version changed from 2.9.5 to 2.9.6

Updated by Jonathan CLARKE almost 12 years ago Actions #17

  • Target version changed from 2.9.6 to 2.9.7

Updated by Jonathan CLARKE almost 12 years ago Actions #18

  • Target version changed from 2.9.7 to 150

Updated by Vincent MEMBRÉ almost 12 years ago Actions #19

  • Target version changed from 150 to 2.10.4

Updated by Nicolas PERRON almost 12 years ago Actions #20

  • Target version changed from 2.10.4 to 2.10.5

Updated by Vincent MEMBRÉ over 11 years ago Actions #21

  • Target version changed from 2.10.5 to 2.10.6

Updated by Matthieu CERDA over 11 years ago Actions #22

  • Target version changed from 2.10.6 to 2.10.7

Updated by Vincent MEMBRÉ over 11 years ago Actions #23

  • Target version changed from 2.10.7 to 2.10.8

Updated by Jonathan CLARKE over 11 years ago Actions #24

  • 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.

Updated by Vincent MEMBRÉ over 11 years ago Actions #25

  • 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

Updated by Vincent MEMBRÉ over 11 years ago Actions #26

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

Updated by Vincent MEMBRÉ over 11 years ago Actions #28

  • 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

Updated by Vincent MEMBRÉ over 11 years ago Actions #29

  • 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: PDF Atom