yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #27570
[Bug 1417649] [NEW] IP filtering is not accurate when used with limit
Public bug reported:
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-6103-43dd-ac58-238baabda422 | Instance1 | private=10.0.0.2 |
| c9ab681f-e930-4e4e-814d-d6f1cf084480 | Instance2 | private=10.0.0.3 |
| f1d6d9ef-e31d-46b5-86a2-da34b45007b0 | Instance3 | private=10.0.0.4 |
+--------------------------------------+-----------+------------------+
* Limit the list to a page size of 1:
$ nova list --sort display_name:asc --limit 1
+--------------------------------------+-----------+------------------+
| ID | Name | Networks |
+--------------------------------------+-----------+------------------+
| 65515d56-6103-43dd-ac58-238baabda422 | Instance1 | private=10.0.0.2 |
+--------------------------------------+-----------+------------------+
* Supply only an IP address filter:
$ nova list --sort display_name:asc --ip 10.0.0.3
+--------------------------------------+-----------+------------------+
| ID | Name | Networks |
+--------------------------------------+-----------+------------------+
| c9ab681f-e930-4e4e-814d-d6f1cf084480 | Instance2 | private=10.0.0.3 |
+--------------------------------------+-----------+------------------+
* 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 |
+----+------+----------+
+----+------+----------+
** Affects: nova
Importance: Undecided
Assignee: Steven Kaufer (kaufer)
Status: New
** Changed in: nova
Assignee: (unassigned) => Steven Kaufer (kaufer)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1417649
Title:
IP filtering is not accurate when used with limit
Status in OpenStack Compute (Nova):
New
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-6103-43dd-ac58-238baabda422 | Instance1 | private=10.0.0.2 |
| c9ab681f-e930-4e4e-814d-d6f1cf084480 | Instance2 | private=10.0.0.3 |
| f1d6d9ef-e31d-46b5-86a2-da34b45007b0 | Instance3 | private=10.0.0.4 |
+--------------------------------------+-----------+------------------+
* Limit the list to a page size of 1:
$ nova list --sort display_name:asc --limit 1
+--------------------------------------+-----------+------------------+
| ID | Name | Networks |
+--------------------------------------+-----------+------------------+
| 65515d56-6103-43dd-ac58-238baabda422 | Instance1 | private=10.0.0.2 |
+--------------------------------------+-----------+------------------+
* Supply only an IP address filter:
$ nova list --sort display_name:asc --ip 10.0.0.3
+--------------------------------------+-----------+------------------+
| ID | Name | Networks |
+--------------------------------------+-----------+------------------+
| c9ab681f-e930-4e4e-814d-d6f1cf084480 | Instance2 | private=10.0.0.3 |
+--------------------------------------+-----------+------------------+
* 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 |
+----+------+----------+
+----+------+----------+
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1417649/+subscriptions
Follow ups
References