cinder/cinder/tests/unit
Sofia Enriquez 51a06f3fcc Allow removing NFS snapshots in error status
The NFS driver doesn't allow to delete snapshots in error state when
snapshot support is disable.

I'm facing some scenarios where snapshots are enabled then a snapshot
is created and after that then snapshots are disabled. This results
in error state snapshots that can't be deleted.  Another scenario is
- with nfs snapshot support disable from the beginning- the API layer
allows the snapshot to be created but the NFS driver sets the status
to "error" leaving the snapshot in the DB with error state.
Because of that, I have snapshots in error state that I'm not able
to delete.

The purpose of this fix allow deleting snapshots in error state.
It makes sense to block creating snapshots when snapshot support is
False. However, when deleting snapshot we don't want to block
attempts to delete a broken snapshot DB entry, which is necessary to
clean up a failed snapshot create.

Closes-Bug: #1842088
Change-Id: Ieb19d5e3f58ae2343b6b145772fec33cb7517ab5
(cherry picked from commit 5714bdb844)
(cherry picked from commit 5a4f3ac53a)
(cherry picked from commit fb0efc4214)
(cherry picked from commit e9ef536958)
2021-09-22 15:20:14 +00:00
..
api API validation: Add cinder_host type to support ipv6 in manage 2021-05-05 10:36:43 -04:00
attachments Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
backup Add support for RBD fast-diff feature for backups stored in Ceph 2021-04-20 11:51:07 +03:00
brick Revert "Synchronize all LVM operations" 2018-12-18 00:18:41 +00:00
cmd Fix online data migrations 2019-09-06 12:48:23 +02:00
compute nova: use EndpointNotFound from keystoneauth1 2019-09-03 10:58:59 -04:00
consistencygroup
db Modify default/delete volume type logic 2020-09-21 11:08:49 +00:00
glance
group Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
image Merge "Make sure stale image metadata is not used" 2019-09-25 09:50:34 +00:00
keymgr Add 'volume_attachment' to volume expected attributes 2018-08-21 17:06:12 +08:00
message Add user messages for some volume snapshot actions 2019-04-26 17:02:05 -04:00
monkey_patch_example
objects Fix cross-project incremental backups 2020-07-02 19:39:00 -03:00
policies Refactor on policy in code 2019-01-15 01:22:37 +00:00
scheduler Continue renaming volume_utils (core) 2019-09-09 20:48:26 -04:00
targets Continue renaming of volume_utils (drivers) 2019-09-10 09:15:45 -04:00
volume Allow removing NFS snapshots in error status 2021-09-22 15:20:14 +00:00
windows Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
zonemanager Brocade: Fix lookup UnboundLocalError 2020-08-20 22:04:48 +02:00
__init__.py
cast_as_call.py
conf_fixture.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
fake_cluster.py
fake_constants.py Merge "Untyped to Default Volume Type" 2019-09-25 18:58:39 +00:00
fake_group.py
fake_group_snapshot.py
fake_notifier.py
fake_objects.py
fake_service.py Fix migration 112 to use live_data_migration API 2017-10-20 18:24:33 -06:00
fake_snapshot.py Add context to cloning snapshots in remotefs driver 2019-07-10 10:41:15 +02:00
fake_utils.py
fake_volume.py Fix VolumeAttachment is not bound to a Session 2019-03-15 11:29:25 +01:00
policy.json Add policy test for volume extend/retype/update_ro policy 2019-01-15 01:22:24 +00:00
test_api.py
test_api_urlmap.py
test_cleanable_manager.py Fix sporadic cleanup unit test failure 2021-05-06 07:57:56 -04:00
test_cmd.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
test_context.py Update oslo.context RequestContext args 2017-11-21 14:56:06 -06:00
test_coordination.py Handle deprecation of inspect.getargspec 2017-11-21 12:57:05 -06:00
test_db_api.py Include deleted volumes for online data migrations 2020-09-01 17:22:11 -04:00
test_db_worker_api.py
test_evaluator.py
test_exception.py Make CinderException format errors fatal for tests 2018-02-06 21:17:17 +00:00
test_fixtures.py Explicitly set expected log level for tests 2017-11-17 16:58:40 -06:00
test_hacking.py Move hacking checks to tests dir 2019-10-09 14:16:58 -04:00
test_image_utils.py Label temporary files created by image_utils 2021-04-19 11:28:16 -04:00
test_interface.py Fix get_driver_options 2019-07-31 20:24:52 +02:00
test_macrosan_drivers.py Continue renaming of volume_utils (drivers) 2019-09-10 09:15:45 -04:00
test_manager.py Add service dynamic log change/query 2017-05-16 13:37:35 +02:00
test_paginate_query.py
test_policy.py Add policy granularity to the encryption API 2018-08-15 09:22:25 -05:00
test_qos_specs.py Move some code out of utils.py 2019-08-26 11:34:20 -04:00
test_quota.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
test_quota_utils.py Remove auth_uri usage 2018-08-29 11:46:11 +08:00
test_rpc.py
test_service.py Refresh the Service.service_id after re-spawning children 2019-01-17 10:23:21 +08:00
test_service_auth.py Add service_token for cinder-nova interaction 2017-12-15 12:04:23 +05:30
test_setup_profiler.py Use constants for cinder-volume 2017-12-29 09:05:08 +08:00
test_ssh_utils.py Fix invalid function name 2019-04-30 14:12:49 +08:00
test_test.py Fix test_rpc_consumer_isolation for oslo.messaging 5.31.0 2017-09-06 15:12:45 -04:00
test_test_utils.py Update oslo.context RequestContext args 2017-11-21 14:56:06 -06:00
test_utils.py Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
test_volume_cleanup.py Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
test_volume_configuration.py Add support for shared "backend_defaults" config 2017-07-11 18:58:58 +00:00
test_volume_glance_metadata.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
test_volume_throttling.py Implement privsep boilerplate in cinder. 2018-06-06 09:42:54 +08:00
test_volume_transfer.py Fix: show volume transfer by name for non-admins 2020-10-21 10:15:14 -04:00
test_volume_types.py Modify default/delete volume type logic 2020-09-21 11:08:49 +00:00
test_volume_types_extra_specs.py
test_volume_utils.py Fix rekeying volume with legacy encryption provider 2020-08-27 09:47:51 -07:00
utils.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00