Add support for cephfs_cached_allocated_capacity_update_interval
Depends-on: https://review.opendev.org/905986 Change-Id: Id7219bc20b0b482b4cb01f50c16d303636bddffa
This commit is contained in:
parent
414b042d06
commit
164fe0a70c
@ -58,6 +58,11 @@
|
||||
# filesystems in the cluster.
|
||||
# Defaults to: $facts['os_service_default']
|
||||
#
|
||||
# [*cephfs_cached_allocated_capacity_update_interval*]
|
||||
# (optional) The maximum time in seconds that the cached pool data will be
|
||||
# considered updated.
|
||||
# Defaults to: $facts['os_service_default']
|
||||
#
|
||||
# [*reserved_share_percentage*]
|
||||
# (optional) The percentage of backend capacity reserved.
|
||||
# Defaults to: $facts['os_service_default']
|
||||
@ -99,27 +104,28 @@
|
||||
# Defaults to: undef
|
||||
#
|
||||
define manila::backend::cephfs (
|
||||
$driver_handles_share_servers = false,
|
||||
$share_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$cephfs_conf_path = '$state_path/ceph.conf',
|
||||
$cephfs_auth_id = 'manila',
|
||||
$cephfs_cluster_name = 'ceph',
|
||||
$cephfs_ganesha_server_ip = $facts['os_service_default'],
|
||||
$cephfs_ganesha_export_ips = $facts['os_service_default'],
|
||||
$cephfs_nfs_cluster_id = $facts['os_service_default'],
|
||||
$cephfs_volume_mode = $facts['os_service_default'],
|
||||
$cephfs_protocol_helper_type = 'CEPHFS',
|
||||
$cephfs_filesystem_name = $facts['os_service_default'],
|
||||
$reserved_share_percentage = $facts['os_service_default'],
|
||||
$reserved_share_from_snapshot_percentage = $facts['os_service_default'],
|
||||
$reserved_share_extend_percentage = $facts['os_service_default'],
|
||||
Boolean $manage_package = true,
|
||||
$driver_handles_share_servers = false,
|
||||
$share_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$cephfs_conf_path = '$state_path/ceph.conf',
|
||||
$cephfs_auth_id = 'manila',
|
||||
$cephfs_cluster_name = 'ceph',
|
||||
$cephfs_ganesha_server_ip = $facts['os_service_default'],
|
||||
$cephfs_ganesha_export_ips = $facts['os_service_default'],
|
||||
$cephfs_nfs_cluster_id = $facts['os_service_default'],
|
||||
$cephfs_volume_mode = $facts['os_service_default'],
|
||||
$cephfs_protocol_helper_type = 'CEPHFS',
|
||||
$cephfs_filesystem_name = $facts['os_service_default'],
|
||||
$cephfs_cached_allocated_capacity_update_interval = $facts['os_service_default'],
|
||||
$reserved_share_percentage = $facts['os_service_default'],
|
||||
$reserved_share_from_snapshot_percentage = $facts['os_service_default'],
|
||||
$reserved_share_extend_percentage = $facts['os_service_default'],
|
||||
Boolean $manage_package = true,
|
||||
# DEPRECATED PARAMETERS
|
||||
$cephfs_ganesha_server_is_remote = undef,
|
||||
$cephfs_ganesha_server_username = undef,
|
||||
$cephfs_ganesha_server_password = undef,
|
||||
$cephfs_ganesha_path_to_private_key = undef,
|
||||
$cephfs_ganesha_server_is_remote = undef,
|
||||
$cephfs_ganesha_server_username = undef,
|
||||
$cephfs_ganesha_server_password = undef,
|
||||
$cephfs_ganesha_path_to_private_key = undef,
|
||||
) {
|
||||
|
||||
include manila::deps
|
||||
@ -139,22 +145,23 @@ define manila::backend::cephfs (
|
||||
$share_driver = 'manila.share.drivers.cephfs.driver.CephFSDriver'
|
||||
|
||||
manila_config {
|
||||
"${name}/driver_handles_share_servers": value => $driver_handles_share_servers;
|
||||
"${name}/share_backend_name": value => $share_backend_name;
|
||||
"${name}/backend_availability_zone": value => $backend_availability_zone;
|
||||
"${name}/share_driver": value => $share_driver;
|
||||
"${name}/cephfs_conf_path": value => $cephfs_conf_path;
|
||||
"${name}/cephfs_auth_id": value => $cephfs_auth_id;
|
||||
"${name}/cephfs_cluster_name": value => $cephfs_cluster_name;
|
||||
"${name}/cephfs_ganesha_server_ip": value => $cephfs_ganesha_server_ip;
|
||||
"${name}/cephfs_ganesha_export_ips": value => join(any2array($cephfs_ganesha_export_ips), ',');
|
||||
"${name}/cephfs_nfs_cluster_id": value => $cephfs_nfs_cluster_id;
|
||||
"${name}/cephfs_volume_mode": value => $cephfs_volume_mode;
|
||||
"${name}/cephfs_protocol_helper_type": value => $cephfs_protocol_helper_type;
|
||||
"${name}/cephfs_filesystem_name": value => $cephfs_filesystem_name;
|
||||
"${name}/reserved_share_percentage": value => $reserved_share_percentage;
|
||||
"${name}/reserved_share_from_snapshot_percentage": value => $reserved_share_from_snapshot_percentage;
|
||||
"${name}/reserved_share_extend_percentage": value => $reserved_share_extend_percentage;
|
||||
"${name}/driver_handles_share_servers": value => $driver_handles_share_servers;
|
||||
"${name}/share_backend_name": value => $share_backend_name;
|
||||
"${name}/backend_availability_zone": value => $backend_availability_zone;
|
||||
"${name}/share_driver": value => $share_driver;
|
||||
"${name}/cephfs_conf_path": value => $cephfs_conf_path;
|
||||
"${name}/cephfs_auth_id": value => $cephfs_auth_id;
|
||||
"${name}/cephfs_cluster_name": value => $cephfs_cluster_name;
|
||||
"${name}/cephfs_ganesha_server_ip": value => $cephfs_ganesha_server_ip;
|
||||
"${name}/cephfs_ganesha_export_ips": value => join(any2array($cephfs_ganesha_export_ips), ',');
|
||||
"${name}/cephfs_nfs_cluster_id": value => $cephfs_nfs_cluster_id;
|
||||
"${name}/cephfs_volume_mode": value => $cephfs_volume_mode;
|
||||
"${name}/cephfs_protocol_helper_type": value => $cephfs_protocol_helper_type;
|
||||
"${name}/cephfs_filesystem_name": value => $cephfs_filesystem_name;
|
||||
"${name}/cephfs_cached_allocated_capacity_update_interval": value => $cephfs_cached_allocated_capacity_update_interval;
|
||||
"${name}/reserved_share_percentage": value => $reserved_share_percentage;
|
||||
"${name}/reserved_share_from_snapshot_percentage": value => $reserved_share_from_snapshot_percentage;
|
||||
"${name}/reserved_share_extend_percentage": value => $reserved_share_extend_percentage;
|
||||
}
|
||||
|
||||
manila_config {
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``manila::backend::cephfs::cephfs_cached_allocated_capacity_update_interval``
|
||||
parameter has been added.
|
@ -7,24 +7,25 @@ describe 'manila::backend::cephfs' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:driver_handles_share_servers => false,
|
||||
:share_backend_name => 'cephfs',
|
||||
:backend_availability_zone => 'my_zone',
|
||||
:cephfs_conf_path => '$state_path/ceph.conf',
|
||||
:cephfs_auth_id => 'manila',
|
||||
:cephfs_cluster_name => 'ceph',
|
||||
:cephfs_protocol_helper_type => 'NFS',
|
||||
:cephfs_ganesha_server_ip => '10.0.0.1',
|
||||
:cephfs_ganesha_export_ips => '10.0.0.1,1001::1001',
|
||||
:cephfs_ganesha_server_is_remote => true,
|
||||
:cephfs_ganesha_server_username => 'ganeshadmin',
|
||||
:cephfs_ganesha_path_to_private_key => '/readable/by/manila.key',
|
||||
:cephfs_nfs_cluster_id => 'mycephfsnfscluster',
|
||||
:cephfs_volume_mode => '0775',
|
||||
:cephfs_filesystem_name => 'cephfs',
|
||||
:reserved_share_percentage => 10.0,
|
||||
:reserved_share_from_snapshot_percentage => 10.1,
|
||||
:reserved_share_extend_percentage => 10.2,
|
||||
:driver_handles_share_servers => false,
|
||||
:share_backend_name => 'cephfs',
|
||||
:backend_availability_zone => 'my_zone',
|
||||
:cephfs_conf_path => '$state_path/ceph.conf',
|
||||
:cephfs_auth_id => 'manila',
|
||||
:cephfs_cluster_name => 'ceph',
|
||||
:cephfs_protocol_helper_type => 'NFS',
|
||||
:cephfs_ganesha_server_ip => '10.0.0.1',
|
||||
:cephfs_ganesha_export_ips => '10.0.0.1,1001::1001',
|
||||
:cephfs_ganesha_server_is_remote => true,
|
||||
:cephfs_ganesha_server_username => 'ganeshadmin',
|
||||
:cephfs_ganesha_path_to_private_key => '/readable/by/manila.key',
|
||||
:cephfs_nfs_cluster_id => 'mycephfsnfscluster',
|
||||
:cephfs_volume_mode => '0775',
|
||||
:cephfs_filesystem_name => 'cephfs',
|
||||
:cephfs_cached_allocated_capacity_update_interval => 60,
|
||||
:reserved_share_percentage => 10.0,
|
||||
:reserved_share_from_snapshot_percentage => 10.1,
|
||||
:reserved_share_extend_percentage => 10.2,
|
||||
}
|
||||
end
|
||||
|
||||
@ -66,6 +67,8 @@ describe 'manila::backend::cephfs' do
|
||||
'mycephfsnfscluster')
|
||||
is_expected.to contain_manila_config('cephfs/cephfs_filesystem_name').with_value(
|
||||
'cephfs')
|
||||
is_expected.to contain_manila_config('cephfs/cephfs_cached_allocated_capacity_update_interval').with_value(
|
||||
60)
|
||||
is_expected.to contain_manila_config('cephfs/reserved_share_percentage').with_value(10.0)
|
||||
is_expected.to contain_manila_config('cephfs/reserved_share_from_snapshot_percentage').with_value(10.1)
|
||||
is_expected.to contain_manila_config('cephfs/reserved_share_extend_percentage').with_value(10.2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user