nova/nova/tests/functional
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
..
api api: Add microversion for extra spec validation 2020-04-08 13:20:02 +00:00
api_sample_tests tests: Define constants in '_IntegratedTestBase' 2020-07-31 14:02:57 +01:00
compute post live migration: don't call Neutron needlessly 2020-09-08 10:40:04 -04:00
db Prevent archiving of pci_devices records because of 'instance_uuid' 2020-11-02 17:53:31 +00:00
libvirt Don't unset Instance.old_flavor, new_flavor until necessary 2020-09-11 17:23:07 +01:00
notification_sample_tests trivial: Use recognized extra specs in tests 2020-02-19 08:24:31 +00:00
regressions Merge "api: Set min, maxItems for server_group.policies field" into stable/ussuri 2020-10-06 02:28:45 +00:00
wsgi functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
__init__.py Eventlet monkey patching should be as early as possible 2019-03-22 09:27:16 +00:00
api_paste_fixture.py Use external placement in functional tests 2018-12-12 18:46:49 +00:00
api_samples_test_base.py tests: Define constants in '_IntegratedTestBase' 2020-07-31 14:02:57 +01:00
fixtures.py Avoid PlacementFixture silently swallowing kwargs 2020-02-19 11:02:28 +00:00
integrated_helpers.py Move revert resize under semaphore 2020-09-11 17:23:07 +01:00
test_aggregates.py func tests: move _run_periodics() into base class 2020-03-24 10:10:53 -04:00
test_availability_zones.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_boot_from_volume.py Remove 'nova.image.api' module 2020-02-18 11:45:39 +00:00
test_cold_migrate.py Use COMPUTE_SAME_HOST_COLD_MIGRATE trait during migrate 2020-01-29 09:44:47 +00:00
test_compute_mgr.py Unplug VIFs as part of cleanup of networks 2020-02-26 14:29:46 +00:00
test_conf_max_attach_disk_devices.py functional: Make '_IntegratedTestBase' subclass 'InstanceHelperMixin' 2019-12-06 15:36:23 +00:00
test_cross_az_attach.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_cross_cell_migrate.py Ensure source compute is up when confirming a resize 2020-09-22 11:46:16 +01:00
test_external_networks.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_flavor_extraspecs.py Follow-up for flavor-extra-spec-validators series 2020-04-08 14:21:13 +01:00
test_images.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_instance_actions.py Expose instance action event details out of the API 2020-03-27 08:20:12 +00:00
test_json_filter.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_legacy_v2_compatible_wrapper.py Allow versioned discovery unauthenticated 2020-04-03 21:24:28 +00:00
test_list_servers_ip_filter.py trivial: Change name of network provided by NeutronFixture 2019-10-05 15:40:28 +01:00
test_login.py update api_samples code to use better variables 2015-12-14 11:23:26 +08:00
test_metadata.py Merge "Add JSON schema and test for network_data.json" 2020-02-18 18:57:16 +00:00
test_middleware.py tests: Define constants in '_IntegratedTestBase' 2020-07-31 14:02:57 +01:00
test_monkey_patch.py Test for disabling greendns 2020-09-24 21:37:23 +00:00
test_multiattach.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_nova_manage.py Merge "Support for nova-manage placement heal_allocations --cell" 2020-04-03 15:13:00 +00:00
test_policy.py Follow-ups for host_status:unknown-only policy rule 2020-03-16 17:18:28 +00:00
test_report_client.py Stop using PlacementDirect 2020-03-05 07:36:37 -06:00
test_scheduler.py func tests: move _run_periodics() into base class 2020-03-24 10:10:53 -04:00
test_server_external_events.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_server_faults.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_server_group.py Update scheduler instance info at confirm resize 2020-05-18 11:29:24 +00:00
test_server_rescue.py api: Introduce microverion 2.87 allowing boot from volume rescue 2020-04-09 08:39:36 +01:00
test_servers.py Ensure source compute is up when confirming a resize 2020-09-22 11:46:16 +01:00
test_servers_provider_tree.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_service.py Reset the cell cache for database access in Service 2020-04-08 17:48:18 +00:00