Added NFS max use and oversub ratios
Added the ability to configure additional cinder options for allocating the over-subscription ratio and for setting the max disk use ratio. Change-Id: I5387563d5cc869e8be38c8d5a4d9c0d0fc3be469
This commit is contained in:
parent
e4fccb9e02
commit
91b1e26d70
@ -5,7 +5,9 @@ class cinder::volume::nfs (
|
||||
$nfs_disk_util = undef,
|
||||
$nfs_sparsed_volumes = undef,
|
||||
$nfs_mount_point_base = undef,
|
||||
$nfs_shares_config = '/etc/cinder/shares.conf'
|
||||
$nfs_shares_config = '/etc/cinder/shares.conf',
|
||||
$nfs_used_ratio = '0.95',
|
||||
$nfs_oversub_ratio = '1.0',
|
||||
) {
|
||||
|
||||
file {$nfs_shares_config:
|
||||
@ -22,5 +24,7 @@ class cinder::volume::nfs (
|
||||
'DEFAULT/nfs_disk_util': value => $nfs_disk_util;
|
||||
'DEFAULT/nfs_sparsed_volumes': value => $nfs_sparsed_volumes;
|
||||
'DEFAULT/nfs_mount_point_base': value => $nfs_mount_point_base;
|
||||
'DEFAULT/nfs_used_ratio': value => $nfs_used_ratio;
|
||||
'DEFAULT/nfs_oversub_ratio': value => $nfs_oversub_ratio;
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,8 @@ describe 'cinder::volume::nfs' do
|
||||
:nfs_disk_util => 'du',
|
||||
:nfs_sparsed_volumes => true,
|
||||
:nfs_mount_point_base => '/cinder_mount_point',
|
||||
:nfs_used_ratio => '0.95',
|
||||
:nfs_oversub_ratio => '1.0',
|
||||
}
|
||||
end
|
||||
|
||||
@ -27,6 +29,10 @@ describe 'cinder::volume::nfs' do
|
||||
'/cinder_mount_point')
|
||||
should contain_cinder_config('DEFAULT/nfs_disk_util').with_value(
|
||||
'du')
|
||||
should contain_cinder_config('DEFAULT/nfs_used_ratio').with_value(
|
||||
'0.95')
|
||||
should contain_cinder_config('DEFAULT/nfs_oversub_ratio').with_value(
|
||||
'1.0')
|
||||
should contain_file('/etc/cinder/other_shares.conf').with(
|
||||
:content => "10.10.10.10:/shares\n10.10.10.10:/shares2",
|
||||
:require => 'Package[cinder]',
|
||||
|
Loading…
x
Reference in New Issue
Block a user