IP filtering is not accurate when used with limit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Steven Kaufer |
Bug Description
When applying an IP address filter to a servers query, the IP address
filtering is manually applied in the compute API against the servers that are
retrieved from the DB.
The problem is when a limit is supplied; in this case, the IP address filter
is only applied to the page of servers that are returned from the DB. For
example, assume that you have 3 instances that match a given IP address filter
and that those instances are returned from the DB in the 5th, 20th, and 100th
positions. If you supply this IP address filter with a limit of 10, then only
a single server is returned (the one in the 5th position). In this case, all
3 instances should have been returned.
A simple example (note that I manually added --limit to the CLI):
* List all 3 serves:
$ nova list --sort display_name:asc
+-----
| ID | Name | Networks |
+-----
| 65515d56-
| c9ab681f-
| f1d6d9ef-
+-----
* Limit the list to a page size of 1:
$ nova list --sort display_name:asc --limit 1
+-----
| ID | Name | Networks |
+-----
| 65515d56-
+-----
* Supply only an IP address filter:
$ nova list --sort display_name:asc --ip 10.0.0.3
+-----
| ID | Name | Networks |
+-----
| c9ab681f-
+-----
* Supply both an IP address filter and a limit (should show a single server):
$ nova list --sort display_name:asc --ip 10.0.0.3 --limit 1
+----+
| ID | Name | Networks |
+----+
+----+
Changed in nova: | |
assignee: | nobody → Steven Kaufer (kaufer) |
Changed in nova: | |
milestone: | none → kilo-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | kilo-3 → 2015.1.0 |
Fix proposed to branch: master /review. openstack. org/152614
Review: https:/