Get volumes with limit and filters does not work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
High
|
Steven Kaufer |
Bug Description
All filtering is done after the volumes are retrieved from the database in the API.get_all function in /cinder/
For example, assume that all of the volumes with a name of "foo" would be retrieved from the database starting at index 100 and that you query for all volumes with a name of "foo" while specifying a limit of 50. In this case, the query would yield 0 results since the filter did not match any of the first 50 entries retrieved from the database.
In order to re-create, first create some volumes:
cinder create --display_name group_one 1
cinder create --display_name group_one 2
cinder create --display_name group_two 1
cinder create --display_name group_two 2
cinder create --display_name group_two 1 --metadata key1=val1
When querying volumes with the following parameters, the first 2 volumes (ie, named 'group_one') will always be returned and the filters will be applied to them only:
/volumes?
Therefore, the following queries yield 0 results even though volumes that match exist:
/volumes?
/volumes?
Changed in cinder: | |
assignee: | nobody → Steven Kaufer (kaufer) |
tags: | added: havana-backport-potential |
Changed in cinder: | |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | icehouse-rc1 → 2014.1 |
Have talked to Steven about this issue and walked through the proposed solution. This is something we should get fixed in Icehouse as filtering really isn't working as it should right now.