yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #69877
[Bug 1737856] Re: Listing instances with a marker doesn't nix the marker if it's found in build_requests
Reviewed: https://review.openstack.org/527564
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1706e3989157f912bce99beb99c75216a064eb2d
Submitter: Zuul
Branch: master
commit 1706e3989157f912bce99beb99c75216a064eb2d
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date: Tue Dec 12 21:27:28 2017 -0500
Raise MarkerNotFound if BuildRequestList.get_by_filters doesn't find marker
For some reason, probably because build requests are meant to be short lived
and we don't get a lot of bugs about paging misbehavior, when paging instances
with a marker, we didn't raise MarkerNotFound if we didn't find the marker in
the list of build requests. Doing so would match what we do when paging over
cells and listing instances using a marker. Once we find the marker, be that
in build_requests, or one of the cells, we need to set the marker to None to
stop looking for it elsewhere if we have more space to fill our limit.
For example, see change I8a957bebfcecd6ac712103c346e028d80f1ecd7c.
This patch fixes the issue by raising MarkerNotFound from BuildRequestList
get_by_filters if there is a marker and we didn't find a build request for
it. The compute API get_all() method handles that as normal and continues
looking for the marker in one of the cells.
Change-Id: I1aa3ca6cc70cef65d24dec1e7db9491c9b73f7ab
Closes-Bug: #1737856
** Changed in: nova
Status: In Progress => Fix Released
--
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/1737856
Title:
Listing instances with a marker doesn't nix the marker if it's found
in build_requests
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) newton series:
Confirmed
Status in OpenStack Compute (nova) ocata series:
Confirmed
Status in OpenStack Compute (nova) pike series:
Confirmed
Bug description:
When listing instances, we start with the build requests and then hit
the cells.
If we're given a marker, we use it to trim the build_requests:
https://github.com/openstack/nova/blob/master/nova/objects/build_request.py#L440-L457
But normally if you're looking for a marker and don't find it, that
get_by_filters code should raise MarkerNotFound to indicate to the
caller that you asked to filter with a marker which isn't here.
If we got results back from build_requests with a marker, then the
compute API get_all() method should null out the marker and continue
filling the limit in the cells, like what we'd do here:
https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2426
And this is how it's handled within a cell database:
https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L2242-L2257
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1737856/+subscriptions
References