Environment: NFS driver with nfs_snapshot_support disabled.
Problem: a user tries to create a snapshot of NFS volume. The snapshot is being created and gets into ERROR state. Neither admin nor user can delete erroneous snap and also cannot delete volume.
Expected behavior: snapshotting is not attempted and user gets appropriate error message
Jul 27 10:04:44 u20openstack cinder-volume[721414]: DEBUG cinder.coordination [None req-cb087522-52ec-44a1-b699-0e556f75ef31 admin None] Lock "b'cinder-nfs-b247f346-0ba1-4d38-9138-6672c7891a53'" acquired by "create_snapshot" :: waited 0.009s {{(pid=721414) _synchronized /opt/stack/cinder/cinder/coordination.py:146}}
Jul 27 10:04:44 u20openstack cinder-volume[721414]: DEBUG cinder.coordination [None req-cb087522-52ec-44a1-b699-0e556f75ef31 admin None] Lock "b'cinder-nfs-b247f346-0ba1-4d38-9138-6672c7891a53'" released by "create_snapshot" :: held 0.005s {{(pid=721414) _synchronized /opt/stack/cinder/cinder/coordination.py:158}}
Jul 27 10:04:44 u20openstack cinder-volume[721414]: INFO cinder.message.api [None req-cb087522-52ec-44a1-b699-0e556f75ef31 admin None] Creating message record for request_id = req-cb087522-52ec-44a1-b699-0e556f75ef31
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server [None req-cb087522-52ec-44a1-b699-0e556f75ef31 admin None] Exception during message handling: cinder.exception.VolumeDriverException: Volume driver reported an error: NFS driver snapshot support is disabled in cinder.conf.
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server Traceback (most recent call last):
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.8/dist-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.8/dist-packages/oslo_messaging/rpc/dispatcher.py", line 309, in dispatch
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.8/dist-packages/oslo_messaging/rpc/dispatcher.py", line 229, in _do_dispatch
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "<decorator-gen-755>", line 2, in create_snapshot
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/objects/cleanable.py", line 208, in wrapper
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server result = f(*args, **kwargs)
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 1174, in create_snapshot
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server self.message_api.create(
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 227, in __exit__
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server self.force_reraise()
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 200, in force_reraise
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server raise self.value
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 1165, in create_snapshot
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server model_update = self.driver.create_snapshot(snapshot)
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "<decorator-gen-785>", line 2, in create_snapshot
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/coordination.py", line 151, in _synchronized
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server return f(*a, **k)
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/drivers/nfs.py", line 590, in create_snapshot
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server self._check_snapshot_support()
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/drivers/nfs.py", line 575, in _check_snapshot_support
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server raise exception.VolumeDriverException(message=msg)
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server cinder.exception.VolumeDriverException: Volume driver reported an error: NFS driver snapshot support is disabled in cinder.conf.
Jul 27 10:04:44 u20openstack cinder-volume[721414]: ERROR oslo_messaging.rpc.server
stack@u20openstack:~/tempest$ cinder snapshot-list
+--------------------------------------+--------------------------------------+----------------+---------+------+----------------------------------+
| ID | Volume ID | Status | Name | Size | User ID |
+--------------------------------------+--------------------------------------+----------------+---------+------+----------------------------------+
| 45b1301a-dcd9-4dd6-bbf4-6599ae6ad262 | b247f346-0ba1-4d38-9138-6672c7891a53 | error | gensnap | 1 | 1551d4ec72c9415382b5c1ad35ccf4f8 |
stack@u20openstack:~/tempest$ cinder snapshot-delete 45b1301a-dcd9-4dd6-bbf4-6599ae6ad262
stack@u20openstack:~/tempest$ cinder snapshot-list
+--------------------------------------+--------------------------------------+----------------+---------+------+----------------------------------+
| ID | Volume ID | Status | Name | Size | User ID |
+--------------------------------------+--------------------------------------+----------------+---------+------+----------------------------------+
| 45b1301a-dcd9-4dd6-bbf4-6599ae6ad262 | b247f346-0ba1-4d38-9138-6672c7891a53 | error_deleting | gensnap | 1 | 1551d4ec72c9415382b5c1ad35ccf4f8 |
stack@u20openstack:~/tempest$ cinder list
+--------------------------------------+-----------+--------+------+----------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------+------+----------------+----------+-------------+
| b247f346-0ba1-4d38-9138-6672c7891a53 | available | genvol | 1 | generic-nfs | false | |
stack@u20openstack:~/tempest$ cinder delete genvol
Delete for volume genvol failed: Invalid volume: Volume status must be available or error or error_restoring or error_extending or error_managing and must not be migrating, attached, belong to a group, have snapshots or be disassociated from snapshots after volume transfer. (HTTP 400) (Request-ID: req-c278c6c5-2a20-4894-a58c-27e7a93fe045)
ERROR: Unable to delete any of the specified volumes.
Greetings Vladislav Belogrudov, /review. opendev. org/c/openstack /cinder/ +/679138, please confirm.
I think the problem you're facing is related to https:/
> Expected behavior: snapshotting is not attempted and user gets appropriate error message
I'm not sure we can consider 'stop the creation of the snapshot' as a bug because it's the way NFS is designed as far as I understand it. But for deleting error state snapshot we already have a bug. This is duplicate of https:/ /bugs.launchpad .net/cinder/ +bug/1842088