Config for cephfs volume path prefix
The cloud administrator needs to use the cephfs volume path prefix to layout multiple cephfs driver backends. When cephfs has multiple data pools, manila can configure `cephfs_volume_path_prefix` to store volume data in different cephfs directories of a ceph filesystem [1] for the different cephfs driver backends. Out of band of manila, the admin can set the pool layouts of these cephfs directories to store the volume data in different data pools of the ceph filesystem. This is helpful for planning different data storage to different ceph OSDs. [1] https://github.com/ceph/ceph/commit/d1a21b07ede#diff-8625369b924524f064e083e735bd34beR267 Change-Id: I19e3dd55f1fded339cb17222b3333c0c0f8835e9 Implements: blueprint cephfs-driver-configurable
This commit is contained in:
parent
7f990ffa16
commit
47805e2241
@ -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:
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- cephfs volume path prefix is now configurable in order to
|
||||
enable support for multiple cephfs back ends.
|
Loading…
Reference in New Issue
Block a user