← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1439928] [NEW] can create the same type and name of a service with v3 API

 

Public bug reported:

i create a service as follows,it can be successful.
curl -H "X-Auth_Token:fc1629a543c64be18937ba8a1296468b" -H "Content-type: application/json" -d '{"service":{"description":"test_service","name":"name_service","type":"test_servce"}}' http://localhost:35357/v3/services |python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   325  100   240  100    85   1265    448 --:--:-- --:--:-- --:--:--  1269
{
    "service": {
        "description": "test_service",
        "enabled": true,
        "id": "2d0da8b3d57b4d35a53d4b4a6659b8e4",
        "links": {
            "self": "http://localhost:35357/v3/services/2d0da8b3d57b4d35a53d4b4a6659b8e4";
        },
        "name": "name_service",
        "type": "test_servce"
    }

when i  create a service with the same command again,it still can be
successful. the service list is as follows,there are two records with
the same name and type.

curl  -H "X-Auth_Token:89abc0b308154bb59b5fcc8bd95669f5" http://localhost:35357/v3/services |python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1920  100  1920    0     0   7874      0 --:--:-- --:--:-- --:--:--  7901
{
    "links": {
        "next": null,
        "previous": null,
        "self": "http://localhost:35357/v3/services";
    },
    "services": [
        {
            "description": "OpenStack Networking",
            "enabled": true,
            "id": "18c27349d6bf4606a81239164a9be42b",
            "links": {
                "self": "http://localhost:35357/v3/services/18c27349d6bf4606a81239164a9be42b";
            },
            "name": "neutron",
            "type": "network"
        },
        {
            "description": "test_service",
            "enabled": true,
            "id": "2d0da8b3d57b4d35a53d4b4a6659b8e4",
            "links": {
                "self": "http://localhost:35357/v3/services/2d0da8b3d57b4d35a53d4b4a6659b8e4";
            },
            "name": "name_service",
            "type": "test_servce"
        },
        
        {
            "description": "test_service",
            "enabled": true,
            "id": "9af35c8f07c541d08b7bd4b65a0307da",
            "links": {
                "self": "http://localhost:35357/v3/services/9af35c8f07c541d08b7bd4b65a0307da";
            },
            "name": "name_service",
            "type": "test_servce"
        },
        
    ]
}

** Affects: keystone
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1439928

Title:
  can create the same type and name of a service with v3 API

Status in OpenStack Identity (Keystone):
  New

Bug description:
  i create a service as follows,it can be successful.
  curl -H "X-Auth_Token:fc1629a543c64be18937ba8a1296468b" -H "Content-type: application/json" -d '{"service":{"description":"test_service","name":"name_service","type":"test_servce"}}' http://localhost:35357/v3/services |python -mjson.tool
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100   325  100   240  100    85   1265    448 --:--:-- --:--:-- --:--:--  1269
  {
      "service": {
          "description": "test_service",
          "enabled": true,
          "id": "2d0da8b3d57b4d35a53d4b4a6659b8e4",
          "links": {
              "self": "http://localhost:35357/v3/services/2d0da8b3d57b4d35a53d4b4a6659b8e4";
          },
          "name": "name_service",
          "type": "test_servce"
      }

  when i  create a service with the same command again,it still can be
  successful. the service list is as follows,there are two records with
  the same name and type.

  curl  -H "X-Auth_Token:89abc0b308154bb59b5fcc8bd95669f5" http://localhost:35357/v3/services |python -mjson.tool
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100  1920  100  1920    0     0   7874      0 --:--:-- --:--:-- --:--:--  7901
  {
      "links": {
          "next": null,
          "previous": null,
          "self": "http://localhost:35357/v3/services";
      },
      "services": [
          {
              "description": "OpenStack Networking",
              "enabled": true,
              "id": "18c27349d6bf4606a81239164a9be42b",
              "links": {
                  "self": "http://localhost:35357/v3/services/18c27349d6bf4606a81239164a9be42b";
              },
              "name": "neutron",
              "type": "network"
          },
          {
              "description": "test_service",
              "enabled": true,
              "id": "2d0da8b3d57b4d35a53d4b4a6659b8e4",
              "links": {
                  "self": "http://localhost:35357/v3/services/2d0da8b3d57b4d35a53d4b4a6659b8e4";
              },
              "name": "name_service",
              "type": "test_servce"
          },
          
          {
              "description": "test_service",
              "enabled": true,
              "id": "9af35c8f07c541d08b7bd4b65a0307da",
              "links": {
                  "self": "http://localhost:35357/v3/services/9af35c8f07c541d08b7bd4b65a0307da";
              },
              "name": "name_service",
              "type": "test_servce"
          },
          
      ]
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1439928/+subscriptions


Follow ups

References