MarkerNotFound when limit>num(instances) and marker starts in cell0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Matt Riedemann | ||
Newton |
Invalid
|
High
|
Unassigned | ||
Ocata |
Fix Committed
|
High
|
Matt Riedemann |
Bug Description
In my Ocata/RDO enviroment, nova version is 15.0.3, if I list instances with a marker&limit, sometimes it says "maker not found".
More details of my operation steps:
First, all instances are listed here without limit&marker:
[root@host015 astute(
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 0e02233c-
| f6347ddb-
| 5de9524f-
| 0548ebed-
| 2c9ee616-
| 9aab5d6a-
| f9ca1f1c-
| dbb3955a-
| a587dc5c-
| 609ba5ca-
| b42e32e5-
+------
Then, I try to list with the first instance id as marker, limited to 3, it's OK:
[root@host015 astute(
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| f6347ddb-
| 5de9524f-
| 0548ebed-
+------
Then, I try to list with another instance, limited to 3, it's error:
[root@host015 astute(
ERROR (BadRequest): marker [a587dc5c-
That's because no enough instance of limitation after the marker?
When I set limitation to 2, it's OK:
[root@host015 astute(
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 609ba5ca-
| b42e32e5-
+------
My question: Why does not limitation work when no enough instance ?
Here is the problem:
All of your instances are in ERROR state so they are in cell0 and we'll pull them from cell0 here:
https:/ /github. com/openstack/ nova/blob/ 15.0.3/ nova/compute/ api.py# L2466
We got 2 back from cell0 but limit was 3, so we make limit=1 here:
https:/ /github. com/openstack/ nova/blob/ 15.0.3/ nova/compute/ api.py# L2474
Since we still have more in the limit, we check the cells:
https:/ /github. com/openstack/ nova/blob/ 15.0.3/ nova/compute/ api.py# L2481
The marker was in cell0 so we're not going to find the marker in the main cell (cell1) so we're not going to find any instances in other cells and eventually raise the 404 here:
https:/ /github. com/openstack/ nova/blob/ 15.0.3/ nova/compute/ api.py# L2596
We should set the marker to None when we pulled instances out of the cell0 database so we don't attempt to use a marker in the other cells.