Add nfs_snapshot_support option

Add new option nfs_snapshot_support, which enables support for
snapshots on the NFS driver.

Change-Id: I0ef36d5e21aaa7d39c272d380e4cc96de76d7381
Closes-Bug: #1734602
(cherry picked from commit 88322e25d9)
This commit is contained in:
ZhongShengping 2017-11-27 14:19:13 +08:00 committed by zhongshengping
parent e48b74669c
commit 8265644242
3 changed files with 14 additions and 0 deletions

View File

@ -72,6 +72,11 @@
# with volume_backend_name=$volume_backend_name key/value.
# Defaults to false.
#
# [*nfs_snapshot_support*]
# (Optional) Enable support for snapshots on the NFS driver.
# Platforms using libvirt <1.2.7 will encounter issues with this feature.
# Defaults to $::os_service_default
#
# [*extra_options*]
# (optional) Hash of extra options to pass to the backend stanza
# Defaults to: {}
@ -91,6 +96,7 @@ define cinder::backend::nfs (
$nfs_oversub_ratio = $::os_service_default,
$nas_secure_file_operations = $::os_service_default,
$nas_secure_file_permissions = $::os_service_default,
$nfs_snapshot_support = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
) {
@ -115,6 +121,7 @@ define cinder::backend::nfs (
"${name}/nfs_mount_point_base": value => $nfs_mount_point_base;
"${name}/nfs_used_ratio": value => $nfs_used_ratio;
"${name}/nfs_oversub_ratio": value => $nfs_oversub_ratio;
"${name}/nfs_snapshot_support": value => $nfs_snapshot_support;
"${name}/nas_secure_file_operations": value =>
$nas_secure_file_operations;
"${name}/nas_secure_file_permissions": value =>

View File

@ -0,0 +1,4 @@
---
features:
- Add new parameter "nfs_snapshot_support", which enables support
for snapshots on the NFS driver.

View File

@ -17,6 +17,7 @@ describe 'cinder::backend::nfs' do
:nfs_oversub_ratio => '0.9',
:nas_secure_file_operations => 'auto',
:nas_secure_file_permissions => 'false',
:nfs_snapshot_support => 'true',
}
end
@ -47,6 +48,8 @@ describe 'cinder::backend::nfs' do
'auto')
is_expected.to contain_cinder_config('hippo/nas_secure_file_permissions').with_value(
'false')
is_expected.to contain_cinder_config('hippo/nfs_snapshot_support').with_value(
'true')
is_expected.to contain_file('/etc/cinder/other_shares.conf').with(
:content => "10.10.10.10:/shares\n10.10.10.10:/shares2",
:require => 'Anchor[cinder::install::end]',