Change Icae5038190ab8c7bbdb38d54ae909fcbf9048912 in Rocky
attempts to online migrate missing consumers table records
when listing allocations for a given resource provider. The
problem is when it's doing an insert-from-select, it's not
handling multiple allocations on the same provider for the
same consumer, like you'd have with a compute instance that
has VCPU, MEMORY_MB and DISK_GB allocations against a single
compute node resource provider. As a result, the insert
statement has duplicate consumer IDs in it which results in
a unique constraint violation.
The existing tests never caught this because they tested with
3 unique consumers with a single allocation each.
The functional test added here hits both online data migration
routines: via the API when listing allocations for a resource
provider and the direct online data migration CLI.
Reviewed: https:/ /review. openstack. org/611314 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=83396b32542 8332bd51c57f895 99cf4cc074c7fb
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 83396b325428332 bd51c57f89599cf 4cc074c7fb
Author: Matt Riedemann <email address hidden>
Date: Tue Oct 16 13:47:05 2018 -0400
Add recreate test for bug 1798163
Change Icae5038190ab8c 7bbdb38d54ae909 fcbf9048912 in Rocky
attempts to online migrate missing consumers table records
when listing allocations for a given resource provider. The
problem is when it's doing an insert-from-select, it's not
handling multiple allocations on the same provider for the
same consumer, like you'd have with a compute instance that
has VCPU, MEMORY_MB and DISK_GB allocations against a single
compute node resource provider. As a result, the insert
statement has duplicate consumer IDs in it which results in
a unique constraint violation.
The existing tests never caught this because they tested with
3 unique consumers with a single allocation each.
The functional test added here hits both online data migration
routines: via the API when listing allocations for a resource
provider and the direct online data migration CLI.
Conflicts:
nova/ tests/functiona l/api/openstack /placement/ db/test_ consumer. py
NOTE(mriedem): The conflict was due to not having change a3f73073c66c29d ddb996fb2c2b266 in Rocky.
I7f5f08691c
Change-Id: Iba56aa6b227b64 55d2437e4fabcd2 96b1b0f06ee 071032e3e63c530 d3fe199b39)
Related-Bug: #1798163
(cherry picked from commit 618b47627d8dc4f