nova servers pagination does not work with deleted marker
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Liyingjun | ||
Kilo |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Nova does not paginate correctly if the marker is a deleted server.
I am trying to get all of the servers for a given tenant. In total (i.e. active, delete, error, etc.) there are 405 servers.
If I query the API without a marker and with a limit larger (for example, 500)
than the total number of servers I get all of them, i.e. the following query
correctly returns 405 servers:
curl (...) "http://
However, if I try to paginate over them, doing:
curl (...) "http://
I get the first 100 with a link to the next page. If I try to follow it:
curl (...) "http://
I am always getting a "badRequest" error saying that the marker is not found. I
guess this is because of these lines in "nova/db/
2000 # paginate query
2001 if marker is not None:
2002 try:
2003 marker = _instance_
2004 except exception.
2005 raise exception.
The function "_instance_
Changed in nova: | |
status: | Invalid → New |
Changed in nova: | |
assignee: | nobody → Liyingjun (liyingjun) |
Changed in nova: | |
milestone: | none → kilo-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | kilo-3 → 2015.1.0 |
In my opinion, it's not a bug because the deleted vm should not be queried.