diff --git a/manila/share/drivers/cephfs/driver.py b/manila/share/drivers/cephfs/driver.py index 922e2a5558..cda4cd46bc 100644 --- a/manila/share/drivers/cephfs/driver.py +++ b/manila/share/drivers/cephfs/driver.py @@ -57,6 +57,10 @@ cephfs_opts = [ default="manila", help="The name of the ceph auth identity to use." ), + cfg.StrOpt('cephfs_volume_path_prefix', + default="/volumes", + help="The prefix of the cephfs volume path." + ), cfg.BoolOpt('cephfs_enable_snapshots', default=False, help="Whether to enable snapshots in this driver." @@ -180,8 +184,10 @@ class CephFSDriver(driver.ExecuteMixin, driver.GaneshaMixin, conf_path = self.configuration.safe_get('cephfs_conf_path') cluster_name = self.configuration.safe_get('cephfs_cluster_name') auth_id = self.configuration.safe_get('cephfs_auth_id') + volume_prefix = self.configuration.safe_get( + 'cephfs_volume_path_prefix') self._volume_client = ceph_volume_client.CephFSVolumeClient( - auth_id, conf_path, cluster_name) + auth_id, conf_path, cluster_name, volume_prefix=volume_prefix) LOG.info("[%(be)s}] Ceph client found, connecting...", {"be": self.backend_name}) if auth_id != CEPH_DEFAULT_AUTH_ID: diff --git a/releasenotes/notes/config-for-cephfs-volume-prefix-67f2513f603cb614.yaml b/releasenotes/notes/config-for-cephfs-volume-prefix-67f2513f603cb614.yaml new file mode 100644 index 0000000000..ac51623702 --- /dev/null +++ b/releasenotes/notes/config-for-cephfs-volume-prefix-67f2513f603cb614.yaml @@ -0,0 +1,4 @@ +--- +features: + - cephfs volume path prefix is now configurable in order to + enable support for multiple cephfs back ends.