From ad171147ff4815e8b8473a6bfb9bbd6f77baeae6 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Tue, 30 Jan 2018 15:48:56 +0530 Subject: [PATCH] drivers/cephfs: log an error if RO access is used and it's unavailable Read-only (RO) access was introduced in Ceph version 10.2.3 (Jewel). If RO access is being used on a lower version, (also) log an error in response. Change-Id: I8c1a735c52054b545524f809cbc35d7a7a39a645 Signed-off-by: Rishabh Dave --- manila/share/drivers/cephfs/driver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manila/share/drivers/cephfs/driver.py b/manila/share/drivers/cephfs/driver.py index 7f7942db30..922e2a5558 100644 --- a/manila/share/drivers/cephfs/driver.py +++ b/manila/share/drivers/cephfs/driver.py @@ -363,12 +363,13 @@ class NativeProtocolHelper(ganesha.NASHelperBase): ceph_auth_id) raise exception.InvalidInput(message=error_message) - # TODO(rraja): Log the Ceph point release version, once available, in - # which the volume client can enable read-only access. if not getattr(self.volume_client, 'version', None): if access['access_level'] == constants.ACCESS_LEVEL_RO: + LOG.error("Need python-cephfs package version 10.2.3 or " + "greater to enable read-only access.") raise exception.InvalidShareAccessLevel( level=constants.ACCESS_LEVEL_RO) + auth_result = self.volume_client.authorize( cephfs_share_path(share), ceph_auth_id) else: