Merge "Add support for logging service plugin configuration"

This commit is contained in:
Zuul 2021-08-16 19:51:22 +00:00 committed by Gerrit Code Review
commit 09369d371b
7 changed files with 140 additions and 54 deletions

View File

@ -95,6 +95,23 @@
# (optional) Name of Open vSwitch bridge to use
# Defaults to $::os_service_default
#
# [*network_log_rate_limit*]
# (Optional) Maximum packets logging per second.
# Used by logging service plugin.
# Defaults to $::os_service_default.
# Minimum possible value is 100.
#
# [*network_log_burst_limit*]
# (Optional) Maximum number of packets per rate_limit.
# Used by logging service plugin.
# Defaults to $::os_service_default.
# Minimum possible value is 25.
#
# [*network_log_local_output_log_base*]
# (Optional) Output logfile path on agent side, default syslog file.
# Used by logging service plugin.
# Defaults to $::os_service_default.
#
# DEPRECATED PARAMETERS
#
# [*gateway_external_network_id*]
@ -122,6 +139,9 @@ class neutron::agents::l3 (
$extensions = $::os_service_default,
$radvd_user = $::os_service_default,
$ovs_integration_bridge = $::os_service_default,
$network_log_rate_limit = $::os_service_default,
$network_log_burst_limit = $::os_service_default,
$network_log_local_output_log_base = $::os_service_default,
# DEPRECATED PARAMETERS
$gateway_external_network_id = undef,
) {
@ -162,6 +182,9 @@ class neutron::agents::l3 (
'ovs/integration_bridge': value => $ovs_integration_bridge;
'agent/availability_zone': value => $availability_zone;
'agent/extensions': value => join(any2array($extensions), ',');
'network_log/rate_limit': value => $network_log_rate_limit;
'network_log/burst_limit': value => $network_log_burst_limit;
'network_log/local_output_log_base': value => $network_log_local_output_log_base;
}
if $::neutron::params::l3_agent_package {

View File

@ -204,6 +204,23 @@
# final egress tables direct output flows for unicast traffic. (boolean value)
# Defaults to $::os_service_default
#
# [*network_log_rate_limit*]
# (Optional) Maximum packets logging per second.
# Used by logging service plugin.
# Defaults to $::os_service_default.
# Minimum possible value is 100.
#
# [*network_log_burst_limit*]
# (Optional) Maximum number of packets per rate_limit.
# Used by logging service plugin.
# Defaults to $::os_service_default.
# Minimum possible value is 25.
#
# [*network_log_local_output_log_base*]
# (Optional) Output logfile path on agent side, default syslog file.
# Used by logging service plugin.
# Defaults to $::os_service_default.
#
class neutron::agents::ml2::ovs (
$package_ensure = 'present',
$enabled = true,
@ -243,6 +260,9 @@ class neutron::agents::ml2::ovs (
$resource_provider_hypervisors = [],
$resource_provider_default_hypervisor = $::os_service_default,
$explicitly_egress_direct = $::os_service_default,
$network_log_rate_limit = $::os_service_default,
$network_log_burst_limit = $::os_service_default,
$network_log_local_output_log_base = $::os_service_default,
) {
include neutron::deps
@ -363,6 +383,9 @@ class neutron::agents::ml2::ovs (
'securitygroup/enable_security_group': value => $enable_security_group;
'ovs/bridge_mac_table_size': value => $bridge_mac_table_size;
'ovs/igmp_snooping_enable': value => $igmp_snooping_enable;
'network_log/rate_limit': value => $network_log_rate_limit;
'network_log/burst_limit': value => $network_log_burst_limit;
'network_log/local_output_log_base': value => $network_log_local_output_log_base;
}
if $firewall_driver {

View File

@ -96,6 +96,23 @@
# Type: boolean
# Defaults to $::os_service_default
#
# [*network_log_rate_limit*]
# (Optional) Maximum packets logging per second.
# Used by logging service plugin.
# Defaults to $::os_service_default.
# Minimum possible value is 100.
#
# [*network_log_burst_limit*]
# (Optional) Maximum number of packets per rate_limit.
# Used by logging service plugin.
# Defaults to $::os_service_default.
# Minimum possible value is 25.
#
# [*network_log_local_output_log_base*]
# (Optional) Output logfile path on agent side, default syslog file.
# Used by logging service plugin.
# Defaults to $::os_service_default.
#
# DEPRECATED PARAMETERS
#
# [*ovn_l3_mode*]
@ -121,6 +138,9 @@ class neutron::plugins::ml2::ovn(
$dns_servers = $::os_service_default,
$vhostuser_socket_dir = $::os_service_default,
$ovn_emit_need_to_frag = $::os_service_default,
$network_log_rate_limit = $::os_service_default,
$network_log_burst_limit = $::os_service_default,
$network_log_local_output_log_base = $::os_service_default,
# DEPRECATED PARAMETERS
$ovn_l3_mode = undef,
$vif_type = undef,
@ -164,6 +184,9 @@ class neutron::plugins::ml2::ovn(
'ovn/dns_servers' : value => join(any2array($dns_servers), ',');
'ovn/vhost_sock_dir' : value => $vhostuser_socket_dir;
'ovn/ovn_emit_need_to_frag' : value => $ovn_emit_need_to_frag;
'network_log/rate_limit' : value => $network_log_rate_limit;
'network_log/burst_limit' : value => $network_log_burst_limit;
'network_log/local_output_log_base' : value => $network_log_local_output_log_base;
}
# TODO(tkajinam): Remove this when removing the deprecated parameters

View File

@ -0,0 +1,9 @@
---
features:
- |
Support for the logging serivce plugin parameters has been added to
the following classes.
- ``neutron::agent::l3``
- ``neutron::agent::ml2::ovs``
- ``neutron::plugins::ml2::ovn``

View File

@ -41,6 +41,9 @@ describe 'neutron::agents::l3' do
should contain_neutron_l3_agent_config('ovs/integration_bridge').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('agent/availability_zone').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('agent/extensions').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('network_log/rate_limit').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('network_log/burst_limit').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('network_log/local_output_log_base').with_value('<SERVICE DEFAULT>')
end
it 'passes purge to resource' do

View File

@ -73,6 +73,9 @@ describe 'neutron::agents::ml2::ovs' do
should contain_neutron_agent_ovs('ovs/resource_provider_default_hypervisor').\
with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('agent/explicitly_egress_direct').with_value(['<SERVICE DEFAULT>'])
should contain_neutron_agent_ovs('network_log/rate_limit').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('network_log/burst_limit').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('network_log/local_output_log_base').with_value('<SERVICE DEFAULT>')
end
it 'installs neutron ovs agent package' do

View File

@ -52,8 +52,10 @@ describe 'neutron::plugins::ml2::ovn' do
should contain_neutron_plugin_ml2('ovn/dns_servers').with_value(params[:dns_servers].join(','))
should contain_neutron_plugin_ml2('ovn/vhost_sock_dir').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('ovn/ovn_emit_need_to_frag').with_value(params[:ovn_emit_need_to_frag])
should contain_neutron_plugin_ml2('network_log/rate_limit').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('network_log/burst_limit').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('network_log/local_output_log_base').with_value('<SERVICE DEFAULT>')
end
end
shared_examples 'Validating parameters' do