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
@ -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*]
|
||||
@ -102,26 +119,29 @@
|
||||
# Defaults to undef
|
||||
#
|
||||
class neutron::agents::l3 (
|
||||
$package_ensure = 'present',
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$debug = $::os_service_default,
|
||||
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
|
||||
$handle_internal_only_routers = $::os_service_default,
|
||||
$metadata_port = $::os_service_default,
|
||||
$periodic_interval = $::os_service_default,
|
||||
$periodic_fuzzy_delay = $::os_service_default,
|
||||
$enable_metadata_proxy = $::os_service_default,
|
||||
$ha_enabled = false,
|
||||
$ha_vrrp_auth_type = 'PASS',
|
||||
$ha_vrrp_auth_password = $::os_service_default,
|
||||
$ha_vrrp_advert_int = '3',
|
||||
$agent_mode = 'legacy',
|
||||
$purge_config = false,
|
||||
$availability_zone = $::os_service_default,
|
||||
$extensions = $::os_service_default,
|
||||
$radvd_user = $::os_service_default,
|
||||
$ovs_integration_bridge = $::os_service_default,
|
||||
$package_ensure = 'present',
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$debug = $::os_service_default,
|
||||
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
|
||||
$handle_internal_only_routers = $::os_service_default,
|
||||
$metadata_port = $::os_service_default,
|
||||
$periodic_interval = $::os_service_default,
|
||||
$periodic_fuzzy_delay = $::os_service_default,
|
||||
$enable_metadata_proxy = $::os_service_default,
|
||||
$ha_enabled = false,
|
||||
$ha_vrrp_auth_type = 'PASS',
|
||||
$ha_vrrp_auth_password = $::os_service_default,
|
||||
$ha_vrrp_advert_int = '3',
|
||||
$agent_mode = 'legacy',
|
||||
$purge_config = false,
|
||||
$availability_zone = $::os_service_default,
|
||||
$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 {
|
||||
|
@ -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 {
|
||||
|
@ -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*]
|
||||
@ -105,25 +122,28 @@
|
||||
# Defaults to undef
|
||||
#
|
||||
class neutron::plugins::ml2::ovn(
|
||||
$ovn_nb_connection = $::os_service_default,
|
||||
$ovn_sb_connection = $::os_service_default,
|
||||
$ovn_nb_private_key = $::os_service_default,
|
||||
$ovn_nb_certificate = $::os_service_default,
|
||||
$ovn_nb_ca_cert = $::os_service_default,
|
||||
$ovn_sb_private_key = $::os_service_default,
|
||||
$ovn_sb_certificate = $::os_service_default,
|
||||
$ovn_sb_ca_cert = $::os_service_default,
|
||||
$package_ensure = 'present',
|
||||
$ovsdb_connection_timeout = $::os_service_default,
|
||||
$neutron_sync_mode = $::os_service_default,
|
||||
$ovn_metadata_enabled = $::os_service_default,
|
||||
$dvr_enabled = $::os_service_default,
|
||||
$dns_servers = $::os_service_default,
|
||||
$vhostuser_socket_dir = $::os_service_default,
|
||||
$ovn_emit_need_to_frag = $::os_service_default,
|
||||
$ovn_nb_connection = $::os_service_default,
|
||||
$ovn_sb_connection = $::os_service_default,
|
||||
$ovn_nb_private_key = $::os_service_default,
|
||||
$ovn_nb_certificate = $::os_service_default,
|
||||
$ovn_nb_ca_cert = $::os_service_default,
|
||||
$ovn_sb_private_key = $::os_service_default,
|
||||
$ovn_sb_certificate = $::os_service_default,
|
||||
$ovn_sb_ca_cert = $::os_service_default,
|
||||
$package_ensure = 'present',
|
||||
$ovsdb_connection_timeout = $::os_service_default,
|
||||
$neutron_sync_mode = $::os_service_default,
|
||||
$ovn_metadata_enabled = $::os_service_default,
|
||||
$dvr_enabled = $::os_service_default,
|
||||
$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,
|
||||
$ovn_l3_mode = undef,
|
||||
$vif_type = undef,
|
||||
) {
|
||||
|
||||
include neutron::deps
|
||||
@ -149,21 +169,24 @@ class neutron::plugins::ml2::ovn(
|
||||
)
|
||||
|
||||
neutron_plugin_ml2 {
|
||||
'ovn/ovn_nb_connection' : value => $ovn_nb_connection;
|
||||
'ovn/ovn_sb_connection' : value => $ovn_sb_connection;
|
||||
'ovn/ovn_nb_private_key' : value => $ovn_nb_private_key;
|
||||
'ovn/ovn_nb_certificate' : value => $ovn_nb_certificate;
|
||||
'ovn/ovn_nb_ca_cert' : value => $ovn_nb_ca_cert;
|
||||
'ovn/ovn_sb_private_key' : value => $ovn_sb_private_key;
|
||||
'ovn/ovn_sb_certificate' : value => $ovn_sb_certificate;
|
||||
'ovn/ovn_sb_ca_cert' : value => $ovn_sb_ca_cert;
|
||||
'ovn/ovsdb_connection_timeout' : value => $ovsdb_connection_timeout;
|
||||
'ovn/neutron_sync_mode' : value => $neutron_sync_mode;
|
||||
'ovn/ovn_metadata_enabled' : value => $ovn_metadata_enabled;
|
||||
'ovn/enable_distributed_floating_ip' : value => $dvr_enabled;
|
||||
'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;
|
||||
'ovn/ovn_nb_connection' : value => $ovn_nb_connection;
|
||||
'ovn/ovn_sb_connection' : value => $ovn_sb_connection;
|
||||
'ovn/ovn_nb_private_key' : value => $ovn_nb_private_key;
|
||||
'ovn/ovn_nb_certificate' : value => $ovn_nb_certificate;
|
||||
'ovn/ovn_nb_ca_cert' : value => $ovn_nb_ca_cert;
|
||||
'ovn/ovn_sb_private_key' : value => $ovn_sb_private_key;
|
||||
'ovn/ovn_sb_certificate' : value => $ovn_sb_certificate;
|
||||
'ovn/ovn_sb_ca_cert' : value => $ovn_sb_ca_cert;
|
||||
'ovn/ovsdb_connection_timeout' : value => $ovsdb_connection_timeout;
|
||||
'ovn/neutron_sync_mode' : value => $neutron_sync_mode;
|
||||
'ovn/ovn_metadata_enabled' : value => $ovn_metadata_enabled;
|
||||
'ovn/enable_distributed_floating_ip': value => $dvr_enabled;
|
||||
'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
|
||||
|
@ -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('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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user