Add parameters for amphora log offloading
This patch adds the Octavia configuration parameters for amphora log offloading. Change-Id: I784c58d6898e843daa153aebb0c89482a7bb6050
This commit is contained in:
parent
8f1d89c9e1
commit
952e448d8f
@ -92,27 +92,69 @@
|
||||
# (optional) Seconds to wait for a port to detach from an amphora.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*admin_log_targets*]
|
||||
# (optional) The list of syslog endpoints, host:port comma separated list,
|
||||
# to receive administrative log messages.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*administrative_log_facility*]
|
||||
# (optional) The syslog "LOG_LOCAL" facility to use for the administrative
|
||||
# log messages.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*forward_all_logs*]
|
||||
# (optional) When true, all log messages from the amphora will be forwarded
|
||||
# to the administrative log endponts, including non-load balancing related
|
||||
# logs.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*tenant_log_targets*]
|
||||
# (optional) The list of syslog endpoints, host:port comma separated list,
|
||||
# to receive tenant traffic flow log messages.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*user_log_facility*]
|
||||
# (optional) The syslog "LOG_LOCAL" facility to use for the tenant traffic
|
||||
# flow log messages.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*user_log_format*]
|
||||
# (optional) The tenant traffic flow log format string.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*disable_local_log_storage*]
|
||||
# (optional) When true, logs will not be stored on the amphora filesystem.
|
||||
# This includes all kernel, system, and security logs.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class octavia::controller (
|
||||
$amp_flavor_id = '65',
|
||||
$amp_image_tag = $::os_service_default,
|
||||
$amp_secgroup_list = $::os_service_default,
|
||||
$amp_boot_network_list = [],
|
||||
$loadbalancer_topology = $::os_service_default,
|
||||
$amphora_driver = 'amphora_haproxy_rest_driver',
|
||||
$compute_driver = 'compute_nova_driver',
|
||||
$network_driver = 'allowed_address_pairs_driver',
|
||||
$enable_ssh_access = true,
|
||||
$amp_ssh_key_name = 'octavia-ssh-key',
|
||||
$timeout_client_data = $::os_service_default,
|
||||
$timeout_member_connect = $::os_service_default,
|
||||
$timeout_member_data = $::os_service_default,
|
||||
$timeout_tcp_inspect = $::os_service_default,
|
||||
$controller_ip_port_list = $::os_service_default,
|
||||
$connection_max_retries = $::os_service_default,
|
||||
$connection_retry_interval = $::os_service_default,
|
||||
$connection_logging = $::os_service_default,
|
||||
$build_active_retries = $::os_service_default,
|
||||
$port_detach_timeout = $::os_service_default,
|
||||
$amp_flavor_id = '65',
|
||||
$amp_image_tag = $::os_service_default,
|
||||
$amp_secgroup_list = $::os_service_default,
|
||||
$amp_boot_network_list = [],
|
||||
$loadbalancer_topology = $::os_service_default,
|
||||
$amphora_driver = 'amphora_haproxy_rest_driver',
|
||||
$compute_driver = 'compute_nova_driver',
|
||||
$network_driver = 'allowed_address_pairs_driver',
|
||||
$enable_ssh_access = true,
|
||||
$amp_ssh_key_name = 'octavia-ssh-key',
|
||||
$timeout_client_data = $::os_service_default,
|
||||
$timeout_member_connect = $::os_service_default,
|
||||
$timeout_member_data = $::os_service_default,
|
||||
$timeout_tcp_inspect = $::os_service_default,
|
||||
$controller_ip_port_list = $::os_service_default,
|
||||
$connection_max_retries = $::os_service_default,
|
||||
$connection_retry_interval = $::os_service_default,
|
||||
$connection_logging = $::os_service_default,
|
||||
$build_active_retries = $::os_service_default,
|
||||
$port_detach_timeout = $::os_service_default,
|
||||
$admin_log_targets = $::os_service_default,
|
||||
$administrative_log_facility = $::os_service_default,
|
||||
$forward_all_logs = $::os_service_default,
|
||||
$tenant_log_targets = $::os_service_default,
|
||||
$user_log_facility = $::os_service_default,
|
||||
$user_log_format = $::os_service_default,
|
||||
$disable_local_log_storage = $::os_service_default,
|
||||
) inherits octavia::params {
|
||||
|
||||
include ::octavia::deps
|
||||
@ -165,5 +207,12 @@ class octavia::controller (
|
||||
'haproxy_amphora/connection_logging' : value => $connection_logging;
|
||||
'haproxy_amphora/build_active_retries' : value => $build_active_retries;
|
||||
'networking/port_detach_timeout' : value => $port_detach_timeout;
|
||||
'amphora_agent/admin_log_targets' : value => $admin_log_targets;
|
||||
'amphora_agent/administrative_log_facility' : value => $administrative_log_facility;
|
||||
'amphora_agent/forward_all_logs' : value => $forward_all_logs;
|
||||
'amphora_agent/tenant_log_targets' : value => $tenant_log_targets;
|
||||
'amphora_agent/user_log_facility' : value => $user_log_facility;
|
||||
'haproxy_amphora/user_log_format' : value => $user_log_format;
|
||||
'amphora_agent/disable_local_log_storage' : value => $disable_local_log_storage;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Added parameters to enable amphora log offloading.
|
@ -13,18 +13,25 @@ describe 'octavia::controller' do
|
||||
|
||||
context 'configured with specific parameters' do
|
||||
let :params do
|
||||
{ :amp_flavor_id => '42',
|
||||
:amp_image_tag => 'amphorae1',
|
||||
:amp_secgroup_list => ['lb-mgmt-sec-grp'],
|
||||
:amp_boot_network_list => ['lbnet1', 'lbnet2'],
|
||||
:loadbalancer_topology => 'SINGLE',
|
||||
:amp_ssh_key_name => 'custom-amphora-key',
|
||||
:controller_ip_port_list => '1.2.3.4:5555,4.3.2.1:5555',
|
||||
:connection_max_retries => 240,
|
||||
:connection_retry_interval => 10,
|
||||
{ :amp_flavor_id => '42',
|
||||
:amp_image_tag => 'amphorae1',
|
||||
:amp_secgroup_list => ['lb-mgmt-sec-grp'],
|
||||
:amp_boot_network_list => ['lbnet1', 'lbnet2'],
|
||||
:loadbalancer_topology => 'SINGLE',
|
||||
:amp_ssh_key_name => 'custom-amphora-key',
|
||||
:controller_ip_port_list => '1.2.3.4:5555,4.3.2.1:5555',
|
||||
:connection_max_retries => 240,
|
||||
:connection_retry_interval => 10,
|
||||
:connection_logging => false,
|
||||
:build_active_retries => 5,
|
||||
:port_detach_timeout => 15
|
||||
:build_active_retries => 5,
|
||||
:port_detach_timeout => 15,
|
||||
:admin_log_targets => '192.0.2.1:10514,2001:db8:1::10:10514',
|
||||
:administrative_log_facility => 2,
|
||||
:forward_all_logs => true,
|
||||
:tenant_log_targets => '192.0.2.1:10514,2001:db8:1::10:10514',
|
||||
:user_log_facility => 3,
|
||||
:user_log_format => '{{ project_id }} {{ lb_id }}',
|
||||
:disable_local_log_storage => true,
|
||||
}
|
||||
end
|
||||
|
||||
@ -40,6 +47,13 @@ describe 'octavia::controller' do
|
||||
it { is_expected.to contain_octavia_config('haproxy_amphora/connection_logging').with_value(false) }
|
||||
it { is_expected.to contain_octavia_config('haproxy_amphora/build_active_retries').with_value(5) }
|
||||
it { is_expected.to contain_octavia_config('networking/port_detach_timeout').with_value(15) }
|
||||
it { is_expected.to contain_octavia_config('amphora_agent/admin_log_targets').with_value('192.0.2.1:10514,2001:db8:1::10:10514') }
|
||||
it { is_expected.to contain_octavia_config('amphora_agent/administrative_log_facility').with_value(2) }
|
||||
it { is_expected.to contain_octavia_config('amphora_agent/forward_all_logs').with_value(true) }
|
||||
it { is_expected.to contain_octavia_config('amphora_agent/tenant_log_targets').with_value('192.0.2.1:10514,2001:db8:1::10:10514') }
|
||||
it { is_expected.to contain_octavia_config('amphora_agent/user_log_facility').with_value(3) }
|
||||
it { is_expected.to contain_octavia_config('haproxy_amphora/user_log_format').with_value('{{ project_id }} {{ lb_id }}') }
|
||||
it { is_expected.to contain_octavia_config('amphora_agent/disable_local_log_storage').with_value(true) }
|
||||
end
|
||||
|
||||
it 'configures worker parameters' do
|
||||
@ -57,6 +71,13 @@ describe 'octavia::controller' do
|
||||
is_expected.to contain_octavia_config('haproxy_amphora/connection_logging').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('networking/port_detach_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_octavia_config('amphora_agent/admin_log_targets').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_octavia_config('amphora_agent/administrative_log_facility').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_octavia_config('amphora_agent/forward_all_logs').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_octavia_config('amphora_agent/tenant_log_targets').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_octavia_config('amphora_agent/user_log_facility').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_octavia_config('haproxy_amphora/user_log_format').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_octavia_config('amphora_agent/disable_local_log_storage').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
context 'with ssh key access disabled' do
|
||||
|
Loading…
Reference in New Issue
Block a user