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 Change-Id: I569fa71e84582b8deb1b45dee6b619d511692b36
This commit is contained in:
parent
07e1fc93ad
commit
61f4fc966b
manifests
releasenotes/notes
spec/classes
@ -95,6 +95,23 @@
|
|||||||
# (optional) Name of Open vSwitch bridge to use
|
# (optional) Name of Open vSwitch bridge to use
|
||||||
# Defaults to $::os_service_default
|
# 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
|
# DEPRECATED PARAMETERS
|
||||||
#
|
#
|
||||||
# [*gateway_external_network_id*]
|
# [*gateway_external_network_id*]
|
||||||
@ -122,6 +139,9 @@ class neutron::agents::l3 (
|
|||||||
$extensions = $::os_service_default,
|
$extensions = $::os_service_default,
|
||||||
$radvd_user = $::os_service_default,
|
$radvd_user = $::os_service_default,
|
||||||
$ovs_integration_bridge = $::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
|
# DEPRECATED PARAMETERS
|
||||||
$gateway_external_network_id = undef,
|
$gateway_external_network_id = undef,
|
||||||
) {
|
) {
|
||||||
@ -162,6 +182,9 @@ class neutron::agents::l3 (
|
|||||||
'ovs/integration_bridge': value => $ovs_integration_bridge;
|
'ovs/integration_bridge': value => $ovs_integration_bridge;
|
||||||
'agent/availability_zone': value => $availability_zone;
|
'agent/availability_zone': value => $availability_zone;
|
||||||
'agent/extensions': value => join(any2array($extensions), ',');
|
'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 {
|
if $::neutron::params::l3_agent_package {
|
||||||
|
@ -204,6 +204,23 @@
|
|||||||
# final egress tables direct output flows for unicast traffic. (boolean value)
|
# final egress tables direct output flows for unicast traffic. (boolean value)
|
||||||
# Defaults to $::os_service_default
|
# 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 (
|
class neutron::agents::ml2::ovs (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
@ -243,6 +260,9 @@ class neutron::agents::ml2::ovs (
|
|||||||
$resource_provider_hypervisors = [],
|
$resource_provider_hypervisors = [],
|
||||||
$resource_provider_default_hypervisor = $::os_service_default,
|
$resource_provider_default_hypervisor = $::os_service_default,
|
||||||
$explicitly_egress_direct = $::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
|
include neutron::deps
|
||||||
@ -363,6 +383,9 @@ class neutron::agents::ml2::ovs (
|
|||||||
'securitygroup/enable_security_group': value => $enable_security_group;
|
'securitygroup/enable_security_group': value => $enable_security_group;
|
||||||
'ovs/bridge_mac_table_size': value => $bridge_mac_table_size;
|
'ovs/bridge_mac_table_size': value => $bridge_mac_table_size;
|
||||||
'ovs/igmp_snooping_enable': value => $igmp_snooping_enable;
|
'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 {
|
if $firewall_driver {
|
||||||
|
@ -96,6 +96,23 @@
|
|||||||
# Type: boolean
|
# Type: boolean
|
||||||
# Defaults to $::os_service_default
|
# 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
|
# DEPRECATED PARAMETERS
|
||||||
#
|
#
|
||||||
# [*ovn_l3_mode*]
|
# [*ovn_l3_mode*]
|
||||||
@ -121,6 +138,9 @@ class neutron::plugins::ml2::ovn(
|
|||||||
$dns_servers = $::os_service_default,
|
$dns_servers = $::os_service_default,
|
||||||
$vhostuser_socket_dir = $::os_service_default,
|
$vhostuser_socket_dir = $::os_service_default,
|
||||||
$ovn_emit_need_to_frag = $::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
|
# DEPRECATED PARAMETERS
|
||||||
$ovn_l3_mode = undef,
|
$ovn_l3_mode = undef,
|
||||||
$vif_type = undef,
|
$vif_type = undef,
|
||||||
@ -164,6 +184,9 @@ class neutron::plugins::ml2::ovn(
|
|||||||
'ovn/dns_servers' : value => join(any2array($dns_servers), ',');
|
'ovn/dns_servers' : value => join(any2array($dns_servers), ',');
|
||||||
'ovn/vhost_sock_dir' : value => $vhostuser_socket_dir;
|
'ovn/vhost_sock_dir' : value => $vhostuser_socket_dir;
|
||||||
'ovn/ovn_emit_need_to_frag' : value => $ovn_emit_need_to_frag;
|
'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
|
# TODO(tkajinam): Remove this when removing the deprecated parameters
|
||||||
|
@ -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``
|
@ -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('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/availability_zone').with_value('<SERVICE DEFAULT>')
|
||||||
should contain_neutron_l3_agent_config('agent/extensions').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
|
end
|
||||||
|
|
||||||
it 'passes purge to resource' do
|
it 'passes purge to resource' do
|
||||||
|
@ -73,6 +73,9 @@ describe 'neutron::agents::ml2::ovs' do
|
|||||||
should contain_neutron_agent_ovs('ovs/resource_provider_default_hypervisor').\
|
should contain_neutron_agent_ovs('ovs/resource_provider_default_hypervisor').\
|
||||||
with_value('<SERVICE DEFAULT>')
|
with_value('<SERVICE DEFAULT>')
|
||||||
should contain_neutron_agent_ovs('agent/explicitly_egress_direct').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
|
end
|
||||||
|
|
||||||
it 'installs neutron ovs agent package' do
|
it 'installs neutron ovs agent package' do
|
||||||
|
@ -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/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/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('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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples 'Validating parameters' do
|
shared_examples 'Validating parameters' do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user