Browse Source

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 <ridave@redhat.com>
changes/73/539173/2
Rishabh Dave 4 years ago
parent
commit
ad171147ff
  1. 5
      manila/share/drivers/cephfs/driver.py

5
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:

Loading…
Cancel
Save