Cinder: Support tuning parameters for backup feature

Change-Id: I0154bcc2f4c4061c8b567ed9e84f2e1497fc0247
This commit is contained in:
Takashi Kajinami 2022-04-14 18:29:59 +09:00
parent 374608c387
commit 0c42b114e4
3 changed files with 44 additions and 18 deletions

View File

@ -25,21 +25,33 @@
# (Optional) Time to wait for cinder volume to be deleted.
# Defaults to $::os_service_default
#
# [*backup_restore_poll_interval*]
# (Optional) Interval between checks when waiting for backup restoring.
# Defaults to $::os_service_default
#
# [*backup_restore_timeout*]
# (Optional) Time to wait for cinder backup to be restored.
# Defaults to $::os_service_default
#
class rally::settings::cinder (
$volume_create_poll_interval = $::os_service_default,
$volume_create_prepoll_delay = $::os_service_default,
$volume_create_timeout = $::os_service_default,
$volume_delete_poll_interval = $::os_service_default,
$volume_delete_timeout = $::os_service_default,
$volume_create_poll_interval = $::os_service_default,
$volume_create_prepoll_delay = $::os_service_default,
$volume_create_timeout = $::os_service_default,
$volume_delete_poll_interval = $::os_service_default,
$volume_delete_timeout = $::os_service_default,
$backup_restore_poll_interval = $::os_service_default,
$backup_restore_timeout = $::os_service_default,
) {
include rally::deps
rally_config {
'openstack/cinder_volume_create_poll_interval': value => $volume_create_poll_interval;
'openstack/cinder_volume_create_prepoll_delay': value => $volume_create_prepoll_delay;
'openstack/cinder_volume_create_timeout': value => $volume_create_timeout;
'openstack/cinder_volume_delete_poll_interval': value => $volume_delete_poll_interval;
'openstack/cinder_volume_delete_timeout': value => $volume_delete_timeout;
'openstack/cinder_volume_create_poll_interval': value => $volume_create_poll_interval;
'openstack/cinder_volume_create_prepoll_delay': value => $volume_create_prepoll_delay;
'openstack/cinder_volume_create_timeout': value => $volume_create_timeout;
'openstack/cinder_volume_delete_poll_interval': value => $volume_delete_poll_interval;
'openstack/cinder_volume_delete_timeout': value => $volume_delete_timeout;
'openstack/cinder_backup_restore_poll_interval': value => $backup_restore_poll_interval;
'openstack/cinder_backup_restore_timeout': value => $backup_restore_timeout;
}
}

View File

@ -0,0 +1,8 @@
---
features:
- |
The ``rally::settings::cinder`` class now supports the following two new
parameters.
- ``backup_restore_poll_interval``
- ``backup_restore_timeout``

View File

@ -9,11 +9,13 @@ describe 'rally::settings::cinder' do
let :rally_cinder_params do
{
:volume_create_prepoll_delay => 2.0,
:volume_create_timeout => 600.0,
:volume_create_poll_interval => 2.0,
:volume_delete_timeout => 600.0,
:volume_delete_poll_interval => 2.0,
:volume_create_prepoll_delay => 2.0,
:volume_create_timeout => 600.0,
:volume_create_poll_interval => 3.0,
:volume_delete_timeout => 601.0,
:volume_delete_poll_interval => 4.0,
:backup_restore_timeout => 602.0,
:backup_restore_poll_interval => 5.0,
}
end
@ -24,6 +26,8 @@ describe 'rally::settings::cinder' do
is_expected.to contain_rally_config('openstack/cinder_volume_create_poll_interval').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_rally_config('openstack/cinder_volume_delete_timeout').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_rally_config('openstack/cinder_volume_delete_poll_interval').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_rally_config('openstack/cinder_backup_restore_timeout').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_rally_config('openstack/cinder_backup_restore_poll_interval').with(:value => '<SERVICE DEFAULT>')
end
end
@ -32,9 +36,11 @@ describe 'rally::settings::cinder' do
it 'configures rally-settings-cinder settings with all parameters' do
is_expected.to contain_rally_config('openstack/cinder_volume_create_prepoll_delay').with(:value => 2.0)
is_expected.to contain_rally_config('openstack/cinder_volume_create_timeout').with(:value => 600.0)
is_expected.to contain_rally_config('openstack/cinder_volume_create_poll_interval').with(:value => 2.0)
is_expected.to contain_rally_config('openstack/cinder_volume_delete_timeout').with(:value => 600.0)
is_expected.to contain_rally_config('openstack/cinder_volume_delete_poll_interval').with(:value => 2.0)
is_expected.to contain_rally_config('openstack/cinder_volume_create_poll_interval').with(:value => 3.0)
is_expected.to contain_rally_config('openstack/cinder_volume_delete_timeout').with(:value => 601.0)
is_expected.to contain_rally_config('openstack/cinder_volume_delete_poll_interval').with(:value => 4.0)
is_expected.to contain_rally_config('openstack/cinder_backup_restore_timeout').with(:value => 602.0)
is_expected.to contain_rally_config('openstack/cinder_backup_restore_poll_interval').with(:value => 5.0)
end
end