non-api bound filters in instance index page are broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
High
|
Huan Xiong |
Bug Description
The issue was observed on latest code and can be reproduced as below:
- go to Admin dashboard instance index page
- select "image name" filter
- input a valid image name value (note: there are instances created with this image)
- press filter button
- a new page is returned with all instance, instead of instances with that image name
The same issue exists for "project" and "flavor name" filter (all are non-api bound filters).
Project dashboard has same issue too.
For Admin dashboard, I think the issue is with these code:
if 'project' in search_opts and \
not swap_filter(
elif 'image_name' in search_opts and \
not swap_filter(images, search_opts, 'image_name', 'image'):
elif "flavor_name" in search_opts and \
not swap_filter(
From what I can tell, they effectively do nothing unless user input invalid filter values. That explains why these filter don't work when user input valid filter values.
For Project dashboard, I don't find code that process the above filters. Bug?
Changed in horizon: | |
importance: | Undecided → High |
milestone: | none → queens-1 |
tags: | added: pike-backport-potential |
tags: | removed: pike-backport-potential |
I believe the issue was introduced in rev df194c ("Make API calls in Instances view parallel").
Take admin dashboard instances index page for example, its workflow was as below before rev df194c:
- get tenant list
- get image list
- get flavor list
- convert 'project', 'image_name' and 'flavor_name' filters, using information got in above steps
- get server list, using modified search options
After rev df194c the workflow was changed to:
- get tenant list, image list, flavor list, and server list in parallel
- convert 'project', 'image_name' and 'flavor_name' filters, using information got in above steps
As you see, the second step is useless because getting server list is done in first step.