yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #52639
[Bug 1594482] Re: list_services API filtered by name can't find the service when using list_limit
Reviewed: https://review.openstack.org/331790
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=6a9a9f002f44c15d40cf890eefd03a4ab6172b0b
Submitter: Jenkins
Branch: master
commit 6a9a9f002f44c15d40cf890eefd03a4ab6172b0b
Author: Roxana Gherle <roxana.gherle@xxxxxxx>
Date: Mon Jun 20 10:53:36 2016 -0700
/services?name=<name> API fails when using list_limit
When using list_limit configuration option in Default section of
keystone.conf, the /services?name=<service_name> API fails to find
the service if list_limit value is smaller than the total number
of services and the searched service is not among the first
'list_limit' services. The API should first filter by name and
only afterwards truncate the result list.
Also, this patch fixes setting the 'truncated' attribute of the
driver's hint.limit object when truncating the list outside of
driver_hints.truncated decorator, problem exposed by fixing the
problem described in the first paragraph.
Closes-Bug: #1594482
Change-Id: I832f542c3cb0faf94a1e5bce5a894f7f4d26a8de
** Changed in: keystone
Status: In Progress => Fix Released
--
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):
Fix Released
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
References