nova/nova/tests/unit/compute
Lee Yarwood 200c743400 compute: Reject requests to commit intermediary snapshot of an inactive instance
Introduced by I76eb2e4da027a13525314bd58264f482374d270d the
os-assisted-volume-snapshots API is only implemented by the libvirt virt
driver and should only be called by c-vol as part of an orchestrated
remotefs based volume snapshot creation or deletion workflow.

While not documented clearly in the current api-ref there are code
comments within the compute API suggesting that this API can be called
against a volume attached to an instance that is in *any* vm_state.

This however is not correct when deleting and in turn committing an
intermediary volume snapshot of an instance that is not running given
the current implementation within the libvirt driver. With a request to
virDomainBlockCommit being made that fails if the instance and
underlying domain is not running.

Adding support for an offline commit isn't trivial and would be
considered a new feature and not something we could backport on the
stable branches. As such this change seeks to ensure requests to commit
an intermediary volume snapshot from an inactive instance are rejected
quickly and clearly by the compute API to the caller before we cast to
the compute.

Closes-Bug: #1919487
Change-Id: I212a2db8d71702d330b146dc6f871b402a309e74
(cherry picked from commit 99409375a0)
2021-04-09 10:06:09 +01:00
..
monitors Do not log a warning about not using compute monitors 2019-04-04 14:32:53 -04:00
provider_config_data Provider Config File: Coding style and test cases improvement 2020-09-01 01:05:34 +00:00
__init__.py
eventlet_utils.py
fake_resource_tracker.py Tests: autospecs all the mock.patch usages 2019-08-19 09:43:10 -05:00
test_api.py compute: Reject requests to commit intermediary snapshot of an inactive instance 2021-04-09 10:06:09 +01:00
test_claims.py pci: track host NUMA topology in stats 2021-03-08 15:19:13 -05:00
test_compute.py Fix check_instance_shared_storage() call 2021-03-25 22:39:17 +00:00
test_compute_mgr.py Bump the Compute RPC API to version 6.0 2021-03-25 11:23:07 +01:00
test_compute_utils.py Merge "Refactor update_pci_request_spec_with_allocated_interface_name" 2021-01-28 22:20:03 +00:00
test_flavors.py Make compute unit tests inherit from test.NoDBTestCase 2015-02-24 17:54:29 +02:00
test_host_api.py Fix aggregate placement sync issue 2020-05-08 02:40:47 +10:00
test_instance_list.py Remove six.text_type (2/2) 2020-12-13 11:26:35 +00:00
test_keypairs.py Remove six.text_type (2/2) 2020-12-13 11:26:35 +00:00
test_multi_cell_list.py Refactor scatter-gather utility to return exception objects 2018-10-31 15:18:07 -04:00
test_provider_config.py Provider Config File: Coding style and test cases improvement 2020-09-01 01:05:34 +00:00
test_provider_tree.py Add resources dict into _Provider 2019-09-13 08:50:35 +00:00
test_resource_tracker.py pci manager: replace node_id parameter with compute_node 2021-03-08 15:18:46 -05:00
test_rpcapi.py Bump the Compute RPC API to version 6.0 2021-03-25 11:23:07 +01:00
test_shelve.py Bump the Compute RPC API to version 6.0 2021-03-25 11:23:07 +01:00
test_stats.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_virtapi.py Reduce gen conflict in COMPUTE_STATUS_DISABLED handling 2020-07-10 17:38:13 +02:00