nova/nova/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 Remove six.add_metaclass 2020-08-15 07:45:39 +00:00
__init__.py Remove nova.compute.*API() shims 2019-06-12 16:09:46 +01:00
api.py compute: Reject requests to commit intermediary snapshot of an inactive instance 2021-04-09 10:06:09 +01:00
build_results.py
claims.py objects: Add MigrationTypeField 2020-05-08 14:45:54 +01:00
flavors.py Remove six.text_type (1/2) 2020-12-13 11:25:31 +00:00
instance_actions.py api: Log os-resetState as an instance action 2021-01-18 09:19:58 +00:00
instance_list.py Plumbing for ignoring list_records_by_skipping_down_cells 2019-02-08 16:28:28 -05:00
manager.py Fix check_instance_shared_storage() call 2021-03-25 22:39:17 +00:00
migration_list.py Refactor scatter-gather utility to return exception objects 2018-10-31 15:18:07 -04:00
multi_cell_list.py Remove six.add_metaclass 2020-08-15 07:45:39 +00:00
power_state.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
provider_config.py Provider Config File: Coding style and test cases improvement 2020-09-01 01:05:34 +00:00
provider_tree.py Remove six.iteritems/itervalues/iterkeys 2020-11-07 03:25:26 +00:00
resource_tracker.py pci manager: replace node_id parameter with compute_node 2021-03-08 15:18:46 -05:00
rpcapi.py Bump the Compute RPC API to version 6.0 2021-03-25 11:23:07 +01:00
stats.py Change consecutive build failure limit to a weigher 2018-06-06 15:18:50 -07:00
task_states.py Fix resource tracker updates during instance evacuation 2018-09-12 13:05:29 +03:00
utils.py Merge "Refactor update_pci_request_spec_with_allocated_interface_name" 2021-01-28 22:20:03 +00:00
vm_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00