Files
deb-nova/nova/compute/api.py
Matt Riedemann 72d28ccd6e Handle MarkerNotFound from cell0 database
When listing instances in the cellv2 world we look them up
from three locations:

1. Build requests which exist before the instances are created
   in the cell database (after the scheduler picks a host to
   build the instance). Currently instances and build requests
   are both created before casting to conductor, but that's going
   away in Ocata with the support for multiple cellsv2 cells.
2. The cell0 database for instances which failed to get scheduled
   to a compute host (and therefore a cell).
3. The actual cell database that the instance lives in. Currently
   that's only a single traditional nova database, but could be one
   of multiple cellsv2 cells when we add that support in Ocata.

If a marker is passed in when listing instances, if the instance
lives in an actual cell database, we'll get a MarkerNotFound failure
from cell0 because the instance doesn't exist in cell0, but we check
cell0 before we check the cell database. This makes the instance
listing short-circuit and fail with a 400 from the REST API.

This patch simply handles the MarkerNotFound when listing instances
from the cell0 database and ignores it so we can continue onto the
cell database.

Closes-Bug: #1647464

Change-Id: I977497be262fb7f2333e32fb7313b29624323422
2016-12-06 17:14:29 -05:00

217 KiB