nova/nova/tests/unit
Lee Yarwood 067cd93424 block_device: Ignore VolumeAttachmentNotFound during detach
Bug #1937084 details a race condition within Cinder where requests to
delete an attachment and later delete the underlying volume can race
leading to the initial request returning a 404 if the volume delete
completes first.

This change attempts to handle this within Nova during a detach as we
ultimately don't care that the volume and/or volume attachment are no
longer available within Cinder. This allows Nova to complete its' own
cleanup of the BlockDeviceMapping record resulting in the volume no
longer appearing attached in Nova's APIs.

Closes-Bug: #1937084

Change-Id: I191552652d8ff5206abad7558c99bce27979dc84
2021-12-03 12:07:33 +00:00
..
accelerator smartnic support - reject server move and suspend 2021-08-05 15:58:41 +08:00
api Merge "Add autopep8 to tox and pre-commit" 2021-11-08 23:54:03 +00:00
cmd Merge "nova-manage: Always get BDMs using get_by_volume_and_instance" 2021-11-22 18:39:03 +00:00
compute Merge "Log instance event wait times" 2021-11-22 17:35:48 +00:00
conductor Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
conf Expose the mdev class 2021-08-27 14:52:01 +01:00
console Merge "console: Improve logging" 2021-09-07 14:29:08 +00:00
db db: Don't pass strings to 'Connection.execute' 2021-11-12 09:58:42 +00:00
fake_loadables
fixtures Test the NotificationFixture 2021-06-10 18:07:47 +02:00
image Retry image download if it's corrupted 2021-11-22 16:15:27 -05:00
keymgr
network Query ports with admin client to get resource_request 2021-10-20 11:39:23 +02:00
notifications objects: Remove 'bandwidth' fields from notifications 2021-11-03 17:33:43 +00:00
objects Merge "objects: Remove 'bandwidth' fields from notifications" 2021-11-10 18:02:50 +00:00
pci Merge "Follow up from bp/pci-socket-affinity series" 2021-08-24 22:08:30 +00:00
policies Merge "Reject server operations with extended resource req" 2021-08-31 00:53:00 +00:00
privsep Retry lvm volume and volume group query 2021-06-15 12:39:26 +02:00
scheduler Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
servicegroup
ssl_cert
storage Avoid modifying the Mock class in test 2021-08-23 17:36:00 +02:00
virt block_device: Ignore VolumeAttachmentNotFound during detach 2021-12-03 12:07:33 +00:00
volume Fix the wrong exception used to retry detach API calls 2021-09-20 11:23:40 +00:00
__init__.py
fake_block_device.py
fake_build_request.py
fake_console_auth_token.py
fake_crypto.py
fake_diagnostics.py
fake_flavor.py
fake_hosts.py
fake_instance.py Remove (almost) all references to 'instance_type' 2021-03-29 12:24:15 +01:00
fake_ldap.py Remove six.moves 2020-11-07 03:25:02 +00:00
fake_network.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
fake_network_cache_model.py Use UUID as vif and network_id in vif tests 2020-09-07 10:31:52 +02:00
fake_pci_device_pools.py
fake_policy.py virt: Remove 'reset_network' API 2020-11-23 15:55:50 +00:00
fake_processutils.py Remove six.binary_type/integer_types/string_types 2020-12-13 11:25:14 +00:00
fake_request_spec.py objects: Introduce 'pcpuset' field for InstanceNUMACell 2020-07-14 00:38:34 +08:00
fake_requests.py
fake_server_actions.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
fake_volume.py
image_fixtures.py
matchers.py Remove six.text_type (2/2) 2020-12-13 11:26:35 +00:00
test_api_validation.py api: Rename 'parameter_types.hostname' -> 'fqdn' 2021-08-19 11:16:59 +01:00
test_availability_zones.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
test_baserpc.py
test_block_device.py fup: Remove unused legacy block_device_info format 2021-08-20 13:26:46 +01:00
test_cache.py
test_cinder.py
test_conf.py db: Post reshuffle cleanup 2021-08-09 15:34:40 +01:00
test_configdrive2.py
test_context.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
test_crypto.py Remove six.moves 2020-11-07 03:25:02 +00:00
test_exception.py rpc: Rework 'get_notifier', 'wrap_exception' 2021-03-01 11:06:48 +00:00
test_exception_wrapper.py Use NotificationFixture for legacy notifications too 2021-05-24 11:00:59 +01:00
test_fixtures.py db: Don't pass strings to 'Connection.execute' 2021-11-12 09:58:42 +00:00
test_hacking.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
test_identity.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
test_json_ref.py Remove six.moves 2020-11-07 03:25:02 +00:00
test_loadables.py
test_matchers.py
test_metadata.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
test_notifications.py objects: Remove 'bandwidth' fields from notifications 2021-11-03 17:33:43 +00:00
test_notifier.py
test_policy.py tests: Move remaining non-libvirt fixtures 2021-05-12 16:32:43 +01:00
test_profiler.py Remove six.moves 2020-11-07 03:25:02 +00:00
test_quota.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
test_rpc.py rpc: Rework 'get_notifier', 'wrap_exception' 2021-03-01 11:06:48 +00:00
test_safeutils.py
test_service.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
test_service_auth.py
test_test.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
test_test_utils.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
test_utils.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
test_versions.py Change API unexpected exception message 2021-02-17 21:30:07 +00:00
test_weights.py
test_wsgi.py Remove six.PY2 and six.PY3 2020-08-15 07:45:23 +00:00
utils.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00