Add support for [controller_worker] amphora_delete_* options

... so that users can tune these options using the native class
parameters.

Change-Id: I13fb52a3f8e0e3237013da2c42c7b8baf322a006
This commit is contained in:
Takashi Kajinami 2022-11-21 11:18:36 +09:00
parent 64869766d8
commit 6840de653f
3 changed files with 27 additions and 1 deletions

View File

@ -64,7 +64,15 @@
# [*amp_timezone*]
# (optional) Defines the timezone to use as represented in
# /usr/share/zoneinfo.
# Default is $::os_service_default
# Defaults to $::os_service_default
#
# [*amphora_delete_retries*]
# (optional) Number of times an amphora delete should be retried.
# Defaults to $::os_service_default
#
# [*amphora_delete_retry_interval*]
# (optional) Time, in seconds, between amphora delete retries.
# Defaults to $::os_service_default
#
# [*amp_ssh_key_name*]
# (optional) Name of Openstack SSH keypair for communicating with amphora
@ -264,6 +272,8 @@ class octavia::controller (
$volume_driver = $::os_service_default,
$image_driver = $::os_service_default,
$amp_timezone = $::os_service_default,
$amphora_delete_retries = $::os_service_default,
$amphora_delete_retry_interval = $::os_service_default,
$enable_ssh_access = true,
$amp_ssh_key_name = 'octavia-ssh-key',
$timeout_client_data = $::os_service_default,
@ -346,6 +356,8 @@ Use the octavia::networking class instead')
'controller_worker/volume_driver' : value => $volume_driver;
'controller_worker/image_driver' : value => $image_driver;
'controller_worker/amp_timezone' : value => $amp_timezone;
'controller_worker/amphora_delete_retries' : value => $amphora_delete_retries;
'controller_worker/amphora_delete_retry_interval' : value => $amphora_delete_retry_interval;
'haproxy_amphora/timeout_client_data' : value => $timeout_client_data;
'haproxy_amphora/timeout_member_connect' : value => $timeout_member_connect;
'haproxy_amphora/timeout_member_data' : value => $timeout_member_data;

View File

@ -0,0 +1,8 @@
---
features:
- |
The ``octavia::controller`` class now supports the following two new
parameters.
- ``amphora_delete_retries``
- ``amphora_delete_retry_interval``

View File

@ -28,6 +28,8 @@ describe 'octavia::controller' do
:image_driver => 'sample_image_driver',
:amp_ssh_key_name => 'custom-amphora-key',
:amp_timezone => 'UTC',
:amphora_delete_retries => 5,
:amphora_delete_retry_interval => 5,
:timeout_client_data => 60,
:timeout_member_connect => 5,
:timeout_member_data => 60,
@ -85,6 +87,8 @@ describe 'octavia::controller' do
is_expected.to contain_octavia_config('controller_worker/image_driver').with_value('sample_image_driver')
is_expected.to contain_octavia_config('controller_worker/amp_ssh_key_name').with_value('custom-amphora-key')
is_expected.to contain_octavia_config('controller_worker/amp_timezone').with_value('UTC')
is_expected.to contain_octavia_config('controller_worker/amphora_delete_retries').with_value(5)
is_expected.to contain_octavia_config('controller_worker/amphora_delete_retry_interval').with_value(5)
is_expected.to contain_octavia_config('haproxy_amphora/timeout_client_data').with_value(60)
is_expected.to contain_octavia_config('haproxy_amphora/timeout_member_connect').with_value(5)
is_expected.to contain_octavia_config('haproxy_amphora/timeout_member_data').with_value(60)
@ -142,6 +146,8 @@ describe 'octavia::controller' do
is_expected.to contain_octavia_config('controller_worker/image_driver').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/amp_ssh_key_name').with_value('octavia-ssh-key')
is_expected.to contain_octavia_config('controller_worker/amp_timezone').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/amphora_delete_retries').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/amphora_delete_retry_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('haproxy_amphora/timeout_client_data').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('haproxy_amphora/timeout_member_connect').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('haproxy_amphora/timeout_member_data').with_value('<SERVICE DEFAULT>')