nova/nova/tests
melanie witt 79df36fecf Prevent archiving of pci_devices records because of 'instance_uuid'
Currently in the archive_deleted_rows code, we will attempt to clean up
"residue" of deleted instance records by assuming any table with a
'instance_uuid' column represents data tied to an instance's lifecycle
and delete such records.

This behavior poses a problem in the case where an instance has a PCI
device allocated and someone deletes the instance. The 'instance_uuid'
column in the pci_devices table is used to track the allocation
association of a PCI with an instance. There is a small time window
during which the instance record has been deleted but the PCI device
has not yet been freed from a database record perspective as PCI
devices are freed during the _complete_deletion method in the compute
manager as part of the resource tracker update call.

Records in the pci_devices table are anyway not related to the
lifecycle of instances so they should not be considered residue to
clean up if an instance is deleted. This adds a condition to avoid
archiving pci_devices on the basis of an instance association.

Closes-Bug: #1899541

Change-Id: Ie62d3566230aa3e2786d129adbb2e3570b06e4c6
(cherry picked from commit 1c256cf774)
(cherry picked from commit 09784db62f)
2020-11-02 17:53:31 +00:00
..
functional Prevent archiving of pci_devices records because of 'instance_uuid' 2020-11-02 17:53:31 +00:00
unit Merge "Move revert resize under semaphore" into stable/ussuri 2020-09-25 15:41:19 +00:00
__init__.py
fixtures.py Ensure source compute is up when confirming a resize 2020-09-22 11:46:16 +01:00
json_ref.py Transform instance.exists notification 2018-06-05 12:51:30 +00:00