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
This commit is contained in:
Ramana Raja 2016-04-12 21:47:12 +05:30 committed by Tom Barron
parent 3dfc4dcb2f
commit 05dcc06dde
3 changed files with 9 additions and 2 deletions

View File

@ -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):

View File

@ -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 = {

View File

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