nova usage-list can return incorrect results, having resources counted
twice. This only occurs when using the 2.40 microversion or later.
This microversion introduced pagination, which doesn't work properly.
Nova API will sort the instances using the tenant id and instance uuid,
but 'os-simple-tenant-usage' will not preserve the order when returning
the results.
For this reason, subsequent API calls made by the client will use the
wrong marker (which is supposed to be the last instance id), ending
up counting the same instances twice.
Reviewed: https:/ /review. openstack. org/608685 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=afc3a16ce33 64c233e6e1cffc9 f38987d1d65318
Committed: https:/
Submitter: Zuul
Branch: master
commit afc3a16ce3364c2 33e6e1cffc9f389 87d1d65318
Author: Lucian Petrut <email address hidden>
Date: Mon Oct 8 17:13:55 2018 +0300
Fix os-simple- tenant- usage result order
nova usage-list can return incorrect results, having resources counted
twice. This only occurs when using the 2.40 microversion or later.
This microversion introduced pagination, which doesn't work properly. tenant- usage' will not preserve the order when returning
Nova API will sort the instances using the tenant id and instance uuid,
but 'os-simple-
the results.
For this reason, subsequent API calls made by the client will use the
wrong marker (which is supposed to be the last instance id), ending
up counting the same instances twice.
Change-Id: I6c7a67b23ec49a a207c33c38580ac d834bb27e3c
Closes-Bug: #1796689