← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1594482] [NEW] list_services API filtered by name can't find the service when using list_limit

 

Public bug reported:

/services?name=<name> API can't find the service when using list_limit configuration.
Before setting list_limit in keystone.conf the following API call behaves correctly: 

stack@mitaka2:/opt/stack/keystone$ curl -H "X-Auth-Token: $TOK" http://mitaka2.com:5000/v3/services?name=keystone | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   318  100   318    0     0     95      0  0:00:03  0:00:03 --:--:--    95
{
    "links": {
        "next": null,
        "previous": null,
        "self": "http://mitaka2.com/identity/v3/services?name=keystone";
    },
    "services": [
        {
            "enabled": true,
            "id": "f7ef63607b8542e0a7cb9a9b1b119c25",
            "links": {
                "self": "http://mitaka2.com/identity/v3/services/f7ef63607b8542e0a7cb9a9b1b119c25";
            },
            "name": "keystone",
            "type": "identity"
        }
    ]
}

After setting list_limit=3 in the Default section in keystone.conf, the
API can't find the service any more:

stack@mitaka2:/opt/stack/keystone$ curl -H "X-Auth-Token: $TOK" http://mitaka2.com:5000/v3/services?name=keystone | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   143  100   143    0     0     43      0  0:00:03  0:00:03 --:--:--    43
{
    "links": {
        "next": null,
        "previous": null,
        "self": "http://mitaka2.com/identity/v3/services?name=keystone";
    },
    "services": [],
    "truncated": true
}

It seems like the list is truncated before applying the name filter.

** Affects: keystone
     Importance: Undecided
     Assignee: Roxana Gherle (roxana-gherle)
         Status: New

** Changed in: keystone
     Assignee: (unassigned) => Roxana Gherle (roxana-gherle)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1594482

Title:
  list_services API filtered by name can't find the service when using
  list_limit

Status in OpenStack Identity (keystone):
  New

Bug description:
  /services?name=<name> API can't find the service when using list_limit configuration.
  Before setting list_limit in keystone.conf the following API call behaves correctly: 

  stack@mitaka2:/opt/stack/keystone$ curl -H "X-Auth-Token: $TOK" http://mitaka2.com:5000/v3/services?name=keystone | python -mjson.tool
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100   318  100   318    0     0     95      0  0:00:03  0:00:03 --:--:--    95
  {
      "links": {
          "next": null,
          "previous": null,
          "self": "http://mitaka2.com/identity/v3/services?name=keystone";
      },
      "services": [
          {
              "enabled": true,
              "id": "f7ef63607b8542e0a7cb9a9b1b119c25",
              "links": {
                  "self": "http://mitaka2.com/identity/v3/services/f7ef63607b8542e0a7cb9a9b1b119c25";
              },
              "name": "keystone",
              "type": "identity"
          }
      ]
  }

  After setting list_limit=3 in the Default section in keystone.conf,
  the API can't find the service any more:

  stack@mitaka2:/opt/stack/keystone$ curl -H "X-Auth-Token: $TOK" http://mitaka2.com:5000/v3/services?name=keystone | python -mjson.tool
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100   143  100   143    0     0     43      0  0:00:03  0:00:03 --:--:--    43
  {
      "links": {
          "next": null,
          "previous": null,
          "self": "http://mitaka2.com/identity/v3/services?name=keystone";
      },
      "services": [],
      "truncated": true
  }

  It seems like the list is truncated before applying the name filter.

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


Follow ups