Add support for logging service plugin configuration
This patch adds possibility to configure logging's service plugin in Neutron. See [1] for details. [1] https://docs.openstack.org/neutron/latest/admin/config-logging.html Conflicts: manifests/agents/ml2/ovs.pp manifests/agents/l3.pp manifests/plugins/ml2/ovn.pp Change-Id: I569fa71e84582b8deb1b45dee6b619d511692b36 (cherry picked from commit61f4fc966b
) (cherry picked from commitbd97629f73
) (cherry picked from commit0c3973b179
) (cherry picked from commitcb475f8e4d
)
This commit is contained in:
parent
424320c268
commit
d462f9bee2
|
@ -94,6 +94,23 @@
|
|||
# "root" specified, because radvd is spawned as root, no "username" parameter
|
||||
# will be passed.
|
||||
#
|
||||
# [*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::l3 (
|
||||
$package_ensure = 'present',
|
||||
$enabled = true,
|
||||
|
@ -115,6 +132,9 @@ class neutron::agents::l3 (
|
|||
$availability_zone = $::os_service_default,
|
||||
$extensions = $::os_service_default,
|
||||
$radvd_user = $::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
|
||||
|
@ -145,6 +165,9 @@ class neutron::agents::l3 (
|
|||
'DEFAULT/radvd_user': value => $radvd_user;
|
||||
'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 {
|
||||
|
|
|
@ -199,6 +199,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.
|
||||
#
|
||||
# DEPRECATED
|
||||
#
|
||||
# [*of_interface*]
|
||||
|
@ -242,6 +259,9 @@ class neutron::agents::ml2::ovs (
|
|||
$resource_provider_bandwidths = [],
|
||||
$resource_provider_hypervisors = [],
|
||||
$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,
|
||||
# DEPRECATED
|
||||
$of_interface = undef,
|
||||
) {
|
||||
|
@ -372,6 +392,9 @@ class neutron::agents::ml2::ovs (
|
|||
'ovs/of_interface': value => $of_interface;
|
||||
'securitygroup/enable_security_group': value => $enable_security_group;
|
||||
'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 {
|
||||
|
|
|
@ -101,7 +101,24 @@
|
|||
# grep "Check pkt length action".
|
||||
# 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.
|
||||
#
|
||||
class neutron::plugins::ml2::ovn(
|
||||
$ovn_nb_connection = $::os_service_default,
|
||||
$ovn_sb_connection = $::os_service_default,
|
||||
|
@ -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,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
@ -163,5 +183,8 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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``
|
|
@ -40,6 +40,9 @@ describe 'neutron::agents::l3' do
|
|||
should contain_neutron_l3_agent_config('DEFAULT/enable_metadata_proxy').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
|
||||
|
|
|
@ -71,6 +71,9 @@ describe 'neutron::agents::ml2::ovs' do
|
|||
should contain_neutron_agent_ovs('ovs/resource_provider_hypervisors').\
|
||||
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
|
||||
|
|
|
@ -56,8 +56,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
|
||||
|
|
Loading…
Reference in New Issue