[Glusterfs] Fix delete share, mount point not disconnected
When we delete the shared instance, in addition to erasing the data
in the share, we should disconnect the client's mount point to
prevent the data from being written in.
Closes-Bug: #1886010
Change-Id: I7a334fb895669cc807a288e6aefe62154a89a7e4
(cherry picked from commit 9d44ba0b6a
)
This commit is contained in:
parent
b780ef9ef3
commit
4f2e400a6b
|
@ -433,6 +433,7 @@ class GlusterfsVolumeMappedLayout(layout.GlusterfsShareLayoutBase):
|
||||||
# them to the pool (after some purification rituals)
|
# them to the pool (after some purification rituals)
|
||||||
self._wipe_gluster_vol(gmgr)
|
self._wipe_gluster_vol(gmgr)
|
||||||
gmgr.set_vol_option(USER_MANILA_SHARE, 'NONE')
|
gmgr.set_vol_option(USER_MANILA_SHARE, 'NONE')
|
||||||
|
gmgr.set_vol_option('nfs.disable', 'on')
|
||||||
|
|
||||||
self._push_gluster_vol(gmgr.qualified)
|
self._push_gluster_vol(gmgr.qualified)
|
||||||
except exception.GlusterfsException:
|
except exception.GlusterfsException:
|
||||||
|
|
|
@ -600,8 +600,10 @@ class GlusterfsVolumeMappedLayoutTestCase(test.TestCase):
|
||||||
self.glusterfs_target1)
|
self.glusterfs_target1)
|
||||||
self._layout.private_storage.delete.assert_called_once_with(
|
self._layout.private_storage.delete.assert_called_once_with(
|
||||||
self.share1['id'])
|
self.share1['id'])
|
||||||
gmgr1.set_vol_option.assert_called_once_with(
|
gmgr1.set_vol_option.assert_has_calls([
|
||||||
'user.manila-share', 'NONE')
|
mock.call('user.manila-share', 'NONE'),
|
||||||
|
mock.call('nfs.disable', 'on')
|
||||||
|
])
|
||||||
|
|
||||||
def test_delete_share_clone(self):
|
def test_delete_share_clone(self):
|
||||||
self._layout._push_gluster_vol = mock.Mock()
|
self._layout._push_gluster_vol = mock.Mock()
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixed `bug #1886010 <https://bugs.launchpad.net/manila/+bug/1886010>`_
|
||||||
|
This bug caused glusterfs shares to still be readable/writable to
|
||||||
|
connected clients while the share was deleted from manila.
|
Loading…
Reference in New Issue