nova/nova/tests
Matt Riedemann e7109d43d6 Add functional regression recreate test for bug 1839560
This adds a functional test which recreates bug 1839560
where the driver reports a node, then no longer reports
it so the compute manager deletes it, and then the driver
reports it again later (this can be common with ironic
nodes as they undergo maintenance). The issue is that since
Ia69fabce8e7fd7de101e291fe133c6f5f5f7056a in Rocky, the
ironic node uuid is re-used for the compute node uuid but
there is a unique constraint on the compute node uuid so
when trying to create the compute node once the ironic node
is available again, the compute node create fails with a
duplicate entry error due to the duplicate uuid. To recreate
this in the functional test, a new fake virt driver is added
which provides a predictable uuid per node like the ironic
driver. The test also shows that archiving the database is
a way to workaround the bug until it's properly fixed.

NOTE(mriedem): Since change I2cf2fcbaebc706f897ce5dfbff47d32117064f9c
is not in Stein this backport needs to modify the test to use
the global set_nodes/restore_nodes which means we can remove some
of the startup hackery at the beginning of the test. Also, since
FakeDriver.set_nodes does not exist in Stein we have to modify the
FakeDriver._nodes variable directly (the global doesn't affect that
after startup).

Change-Id: If822509e906d5094f13a8700b2b9ed3c40580431
Related-Bug: #1839560
(cherry picked from commit 89dd74ac7f)
2019-08-15 11:57:42 -04:00
..
functional Add functional regression recreate test for bug 1839560 2019-08-15 11:57:42 -04:00
live_migration/hooks Replace openstack.org git:// URLs with https:// 2019-03-24 20:34:47 +00:00
unit rt: only map compute node if we created it 2019-08-13 16:30:14 -04:00
__init__.py
fixtures.py Fix no propagation of nova context request_id 2019-07-14 11:58:38 +09:00
json_ref.py Transform instance.exists notification 2018-06-05 12:51:30 +00:00