From 6840de653f717ccb715d362dd4f054c8e57ec8ae Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 21 Nov 2022 11:18:36 +0900 Subject: [PATCH] Add support for [controller_worker] amphora_delete_* options ... so that users can tune these options using the native class parameters. Change-Id: I13fb52a3f8e0e3237013da2c42c7b8baf322a006 --- manifests/controller.pp | 14 +++++++++++++- .../amphora_delete-opts-187baf4230e484fb.yaml | 8 ++++++++ spec/classes/octavia_controller_spec.rb | 6 ++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/amphora_delete-opts-187baf4230e484fb.yaml diff --git a/manifests/controller.pp b/manifests/controller.pp index 170f88e6..28cad61e 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -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; diff --git a/releasenotes/notes/amphora_delete-opts-187baf4230e484fb.yaml b/releasenotes/notes/amphora_delete-opts-187baf4230e484fb.yaml new file mode 100644 index 00000000..4e400df0 --- /dev/null +++ b/releasenotes/notes/amphora_delete-opts-187baf4230e484fb.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + The ``octavia::controller`` class now supports the following two new + parameters. + + - ``amphora_delete_retries`` + - ``amphora_delete_retry_interval`` diff --git a/spec/classes/octavia_controller_spec.rb b/spec/classes/octavia_controller_spec.rb index 778fa44c..edf6fdc5 100644 --- a/spec/classes/octavia_controller_spec.rb +++ b/spec/classes/octavia_controller_spec.rb @@ -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('') 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('') + is_expected.to contain_octavia_config('controller_worker/amphora_delete_retries').with_value('') + is_expected.to contain_octavia_config('controller_worker/amphora_delete_retry_interval').with_value('') is_expected.to contain_octavia_config('haproxy_amphora/timeout_client_data').with_value('') is_expected.to contain_octavia_config('haproxy_amphora/timeout_member_connect').with_value('') is_expected.to contain_octavia_config('haproxy_amphora/timeout_member_data').with_value('')