Browse Source

Merge "Allow removing NFS snapshots in error status" into stable/train

changes/46/817546/1
Zuul 7 months ago committed by Gerrit Code Review
parent
commit
5aed9c679b
  1. 3
      cinder/tests/unit/volume/drivers/test_nfs.py
  2. 1
      cinder/volume/drivers/nfs.py

3
cinder/tests/unit/volume/drivers/test_nfs.py

@ -1378,6 +1378,8 @@ class NfsDriverTestCase(test.TestCase):
mock.patch.object(drv, '_read_info_file', return_value={}), \
mock.patch.object(drv, '_do_create_snapshot') \
as mock_do_create_snapshot, \
mock.patch.object(drv, '_check_snapshot_support') \
as mock_check_support, \
mock.patch.object(drv, '_write_info_file') \
as mock_write_info_file, \
mock.patch.object(drv, 'get_active_image_from_info',
@ -1386,6 +1388,7 @@ class NfsDriverTestCase(test.TestCase):
return_value=snap_path):
self._driver.create_snapshot(fake_snap)
mock_check_support.assert_called_once()
mock_do_create_snapshot.assert_called_with(fake_snap, volume['name'],
snap_path)
mock_write_info_file.assert_called_with(

1
cinder/volume/drivers/nfs.py

@ -574,7 +574,6 @@ class NfsDriver(remotefs.RemoteFSSnapDriverDistributed):
def delete_snapshot(self, snapshot):
"""Apply locking to the delete snapshot operation."""
self._check_snapshot_support()
return self._delete_snapshot(snapshot)
def _copy_volume_from_snapshot(self, snapshot, volume, volume_size):

Loading…
Cancel
Save