Reviewed: https://review.openstack.org/572539 Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=abaa86fd86d4beca0082ff1768d5306e5e86302e Submitter: Zuul Branch: master
commit abaa86fd86d4beca0082ff1768d5306e5e86302e Author: Matt Riedemann <[email protected]> Date: Tue Jun 5 19:57:49 2018 +0000 Revert "Fix listing of instances above API max_limit" This reverts commit eff607ccef91d09052d58f6798f68d67404f51ce. There was no apparent need for the change being reverted since user can list all servers by specifying --limit=1 when running the nova list command. The change introduced a problem whereby the first pass to list instances from the server would get up to [api]/max_limit (default 1000) results and then call again with a marker. If the last instance in the list (the marker) is corrupted in the instance_mappings table in the API DB by not having an associated cell mapping, listing instances will always fail with a MarkerNotFound error even though the CLI user is not passing a marker nor specifying --limit=-1. The corrupted instance mapping record resulting in the MarkerNotFound error is something else that should be fixed on the server side (and likely result in a 500) but the change in behavior of the CLI makes it always fail if you hit this even if you're not passing a marker. Change-Id: Ibb43f500a74733b85bd3242592d36985bfb45856 Closes-Bug: #1773945 ** Changed in: python-novaclient 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/1773945 Title: nova client servers.list crashes with bad marker Status in OpenStack Compute (nova): New Status in python-novaclient: Fix Released Bug description: We have a python script that called servers.list() on an instance of novaclient.v2.client.Client . Sometimes that raises a "BadRequest marker not found" exception: Our call: client = nova_client.Client("2", session=some_session) client.servers.list() Observed Stacktrace: File "/usr/lib/python2.7/site-packages/XXXX/XXXX.py", line 630, in XXXX: all_servers = self.nova.servers.list() File "/usr/lib/python2.7/site-packages/novaclient/v2/servers.py", line 854, in list "servers") File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 257, in _list resp, body = self.api.client.get(url) File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 304, in get return self.request(url, 'GET', **kwargs) File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 83, in request raise exceptions.from_response(resp, body, url, method) BadRequest: marker [6a91d602-ab6e-42e0-929e-5ec33df2ddef] not found (HTTP 400) (Request-ID: req-78827725-801d-4514-8cc8-e4b94f15c191) Discussion: We have a lot of stacks and we sometimes create multiple stacks at the same time. We've noticed that that the stacks with the mentioned UUIDs were created just before these errors occur. It seems that when a newly-created stack appears at a certain location in the server list, its UUID is used as a marker, but the code that validates the marker does not recognize such stacks. Relevant versions: - python-novaclient (9.1.0) - nova (16.0.0) To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1773945/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

