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.
NOTE(melwitt): The differences from the Queens change in the sample
.tpl and .json files are because change
I3b25debb0bcfd4e211734307c8d363f2b5dbc655 is not in Pike, so there
are only two generated UUIDs per server (instance UUID and vif UUID)
instead of three (instance UUID, vif UUID, and bdm UUID).
Change-Id: I6c7a67b23ec49aa207c33c38580acd834bb27e3c
Closes-Bug: #1796689
(cherry picked from commit afc3a16ce3364c233e6e1cffc9f38987d1d65318)
(cherry picked from commit 133b194ba079abe84900d09a5c3c74ef9f464bab)
(cherry picked from commit 70b4cdce68f9b1543c032aa700e4f0f4289d90a6)
Reviewed: https:/ /review. opendev. org/709600 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=f8a721ae85c ab44754b8e64434 e90f4c2afa89aa
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit f8a721ae85cab44 754b8e64434e90f 4c2afa89aa
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.
NOTE(melwitt): The differences from the Queens change in the sample cfd4e211734307c 8d363f2b5dbc655 is not in Pike, so there
.tpl and .json files are because change
I3b25debb0b
are only two generated UUIDs per server (instance UUID and vif UUID)
instead of three (instance UUID, vif UUID, and bdm UUID).
Change-Id: I6c7a67b23ec49a a207c33c38580ac d834bb27e3c 33e6e1cffc9f389 87d1d65318) 84900d09a5c3c74 ef9f464bab) 43c032aa700e4f0 f4289d90a6)
Closes-Bug: #1796689
(cherry picked from commit afc3a16ce3364c2
(cherry picked from commit 133b194ba079abe
(cherry picked from commit 70b4cdce68f9b15