Browse Source

cephfs_native: Fix client eviction

During deny access, the driver evicts client based on its auth ID
and the share its accessing. It does not make the correct use of
ceph_volume_client library to do this. So fix the evict method call.

Closes-Bug: #1567298

Change-Id: I707d1f2d455106f45c35aa28ca2a30fb0460f9e8
changes/66/304766/4
Ramana Raja 6 years ago
committed by Tom Barron
parent
commit
05dcc06dde
  1. 5
      manila/share/drivers/cephfs/cephfs_native.py
  2. 3
      manila/tests/share/drivers/cephfs/test_cephfs_native.py
  3. 3
      releasenotes/notes/cephfs-native-fix-evict-c45fd2de8f520757.yaml

5
manila/share/drivers/cephfs/cephfs_native.py

@ -227,8 +227,9 @@ class CephFSNativeDriver(driver.ShareDriver,):
self.volume_client.deauthorize(self._share_path(share),
access['access_to'])
self.volume_client.evict(self._share_path(share),
access['access_to'])
self.volume_client.evict(
access['access_to'],
volume_path=self._share_path(share))
def update_access(self, context, share, access_rules, add_rules,
delete_rules, share_server=None):

3
manila/tests/share/drivers/cephfs/test_cephfs_native.py

@ -200,6 +200,9 @@ class CephFSNativeDriverTestCase(test.TestCase):
self._driver._volume_client.deauthorize.assert_called_once_with(
self._driver._share_path(self._share),
"alice")
self._driver._volume_client.evict.assert_called_once_with(
"alice",
volume_path=self._driver._share_path(self._share))
def test_update_access_add_rm(self):
alice = {

3
releasenotes/notes/cephfs-native-fix-evict-c45fd2de8f520757.yaml

@ -0,0 +1,3 @@
---
fixes:
- In cephfs_native driver, fixed client eviction call during access denial.
Loading…
Cancel
Save