Merge "Support (api_)db_commit_retry parameters"

This commit is contained in:
Zuul 2024-01-12 17:43:37 +00:00 committed by Gerrit Code Review
commit 228010328f
3 changed files with 77 additions and 0 deletions

View File

@ -82,6 +82,22 @@
# (optional) Enable octavia event notifications.
# Defaults to $facts['os_service_default']
#
# [*db_commit_retry_attempts*]
# (optional) The number of times the database action will be attempted.
# Defaults to $facts['os_service_default']
#
# [*db_commit_retry_initial_delay*]
# (optional) The time to backoff retry attempt.
# Defaults to $facts['os_service_default']
#
# [*db_commit_retry_backoff*]
# (optional) Tie time to backoff retry attempts.
# Defaults to $facts['os_service_default']
#
# [*db_commit_retry_max*]
# (optional) The maximum amount of time to wait between retry attempts.
# Defaults to $facts['os_service_default']
#
# [*amp_ssh_key_name*]
# (optional) Name of Openstack SSH keypair for communicating with amphora
# Defaults to 'octavia-ssh-key'
@ -152,6 +168,22 @@
# (optional) Retry timeout between build attempts in seconds.
# Defaults to $facts['os_service_default']
#
# [*api_db_commit_retry_attempts*]
# (optional) The number of times the database action will be attempted.
# Defaults to $facts['os_service_default']
#
# [*api_db_commit_retry_initial_delay*]
# (optional) The time to backoff retry attempt.
# Defaults to $facts['os_service_default']
#
# [*api_db_commit_retry_backoff*]
# (optional) Tie time to backoff retry attempts.
# Defaults to $facts['os_service_default']
#
# [*api_db_commit_retry_max*]
# (optional) The maximum amount of time to wait between retry attempts.
# Defaults to $facts['os_service_default']
#
# [*default_connection_limit*]
# (optional) Default connection_limit for listeners.
# Defaults to $facts['os_service_default']
@ -274,6 +306,10 @@ class octavia::controller (
$amphora_delete_retries = $facts['os_service_default'],
$amphora_delete_retry_interval = $facts['os_service_default'],
$event_notifications = $facts['os_service_default'],
$db_commit_retry_attempts = $facts['os_service_default'],
$db_commit_retry_initial_delay = $facts['os_service_default'],
$db_commit_retry_backoff = $facts['os_service_default'],
$db_commit_retry_max = $facts['os_service_default'],
Boolean $enable_ssh_access = true,
String[1] $amp_ssh_key_name = 'octavia-ssh-key',
$timeout_client_data = $facts['os_service_default'],
@ -290,6 +326,10 @@ class octavia::controller (
$build_rate_limit = $facts['os_service_default'],
$build_active_retries = $facts['os_service_default'],
$build_retry_interval = $facts['os_service_default'],
$api_db_commit_retry_attempts = $facts['os_service_default'],
$api_db_commit_retry_initial_delay = $facts['os_service_default'],
$api_db_commit_retry_backoff = $facts['os_service_default'],
$api_db_commit_retry_max = $facts['os_service_default'],
$default_connection_limit = $facts['os_service_default'],
$agent_request_read_timeout = $facts['os_service_default'],
$agent_tls_protocol = $facts['os_service_default'],
@ -348,6 +388,10 @@ class octavia::controller (
'controller_worker/amphora_delete_retries' : value => $amphora_delete_retries;
'controller_worker/amphora_delete_retry_interval' : value => $amphora_delete_retry_interval;
'controller_worker/event_notifications' : value => $event_notifications;
'controller_worker/db_commit_retry_attempts' : value => $db_commit_retry_attempts;
'controller_worker/db_commit_retry_initial_delay' : value => $db_commit_retry_initial_delay;
'controller_worker/db_commit_retry_backoff' : value => $db_commit_retry_backoff;
'controller_worker/db_commit_retry_max' : value => $db_commit_retry_max;
'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;
@ -362,6 +406,10 @@ class octavia::controller (
'haproxy_amphora/build_rate_limit' : value => $build_rate_limit;
'haproxy_amphora/build_active_retries' : value => $build_active_retries;
'haproxy_amphora/build_retry_interval' : value => $build_retry_interval;
'haproxy_amphora/api_db_commit_retry_attempts' : value => $api_db_commit_retry_attempts;
'haproxy_amphora/api_db_commit_retry_initial_delay' : value => $api_db_commit_retry_initial_delay;
'haproxy_amphora/api_db_commit_retry_backoff' : value => $api_db_commit_retry_backoff;
'haproxy_amphora/api_db_commit_retry_max' : value => $api_db_commit_retry_max;
'haproxy_amphora/default_connection_limit' : value => $default_connection_limit;
'amphora_agent/agent_request_read_timeout' : value => $agent_request_read_timeout;
'amphora_agent/agent_tls_protocol' : value => $agent_tls_protocol;

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``octavia::controller`` class now supports the tunable parameters to
customize database coomit retry attempts.

View File

@ -38,6 +38,10 @@ describe 'octavia::controller' do
:amphora_delete_retries => 5,
:amphora_delete_retry_interval => 5,
:event_notifications => true,
:db_commit_retry_attempts => 2000,
:db_commit_retry_initial_delay => 1,
:db_commit_retry_backoff => 1,
:db_commit_retry_max => 5,
:timeout_client_data => 60,
:timeout_member_connect => 5,
:timeout_member_data => 60,
@ -51,6 +55,10 @@ describe 'octavia::controller' do
:build_rate_limit => 10,
:build_active_retries => 120,
:build_retry_interval => 5,
:api_db_commit_retry_attempts => 15,
:api_db_commit_retry_initial_delay => 1,
:api_db_commit_retry_backoff => 1,
:api_db_commit_retry_max => 5,
:default_connection_limit => 50000,
:agent_request_read_timeout => 180,
:agent_tls_protocol => 'TLSv1.2',
@ -96,6 +104,10 @@ describe 'octavia::controller' do
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('controller_worker/event_notifications').with_value(true)
is_expected.to contain_octavia_config('controller_worker/db_commit_retry_attempts').with_value(2000)
is_expected.to contain_octavia_config('controller_worker/db_commit_retry_initial_delay').with_value(1)
is_expected.to contain_octavia_config('controller_worker/db_commit_retry_backoff').with_value(1)
is_expected.to contain_octavia_config('controller_worker/db_commit_retry_max').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)
@ -109,6 +121,10 @@ describe 'octavia::controller' do
is_expected.to contain_octavia_config('haproxy_amphora/build_rate_limit').with_value(10)
is_expected.to contain_octavia_config('haproxy_amphora/build_active_retries').with_value(120)
is_expected.to contain_octavia_config('haproxy_amphora/build_retry_interval').with_value(5)
is_expected.to contain_octavia_config('haproxy_amphora/api_db_commit_retry_attempts').with_value(15)
is_expected.to contain_octavia_config('haproxy_amphora/api_db_commit_retry_initial_delay').with_value(1)
is_expected.to contain_octavia_config('haproxy_amphora/api_db_commit_retry_backoff').with_value(1)
is_expected.to contain_octavia_config('haproxy_amphora/api_db_commit_retry_max').with_value(5)
is_expected.to contain_octavia_config('haproxy_amphora/default_connection_limit').with_value(50000)
is_expected.to contain_octavia_config('amphora_agent/agent_request_read_timeout').with_value(180)
is_expected.to contain_octavia_config('amphora_agent/agent_tls_protocol').with_value('TLSv1.2')
@ -159,6 +175,10 @@ describe 'octavia::controller' do
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('controller_worker/event_notifications').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/db_commit_retry_attempts').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/db_commit_retry_initial_delay').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/db_commit_retry_backoff').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/db_commit_retry_max').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>')
@ -173,6 +193,10 @@ describe 'octavia::controller' do
is_expected.to contain_octavia_config('haproxy_amphora/build_rate_limit').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('haproxy_amphora/build_active_retries').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('haproxy_amphora/build_retry_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('haproxy_amphora/api_db_commit_retry_attempts').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('haproxy_amphora/api_db_commit_retry_initial_delay').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('haproxy_amphora/api_db_commit_retry_backoff').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('haproxy_amphora/api_db_commit_retry_max').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('haproxy_amphora/default_connection_limit').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('amphora_agent/agent_request_read_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('amphora_agent/agent_tls_protocol').with_value('<SERVICE DEFAULT>')