From c9f0a5af0148f6a83b67422dabdaf786676c3756 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Wed, 11 Aug 2021 12:49:37 +0200 Subject: [PATCH] Added support for Neutron loggings service plugin configuration Depends-On: https://review.opendev.org/c/openstack/puppet-neutron/+/804220/ Related: rhbz#1990357 Change-Id: Ic045cdf0544fffeed51871d5b970fd29707fcd95 --- .../neutron/neutron-l3-container-puppet.yaml | 23 ++++++++++++++++++ .../neutron-ovs-agent-container-puppet.yaml | 23 ++++++++++++++++++ .../neutron/neutron-plugin-ml2-ovn.yaml | 24 +++++++++++++++++++ ...plugin-support-added-b2e1292d49e087c3.yaml | 12 ++++++++++ 4 files changed, 82 insertions(+) create mode 100644 releasenotes/notes/neutron-logging-plugin-support-added-b2e1292d49e087c3.yaml diff --git a/deployment/neutron/neutron-l3-container-puppet.yaml b/deployment/neutron/neutron-l3-container-puppet.yaml index c22af947f0..5edf25372a 100644 --- a/deployment/neutron/neutron-l3-container-puppet.yaml +++ b/deployment/neutron/neutron-l3-container-puppet.yaml @@ -125,11 +125,29 @@ parameters: will be passed type: string + NeutronL3AgentLoggingRateLimit: + default: 100 + description: | + Maximum number of packets logging per second + type: number + NeutronL3AgentLoggingBurstLimit: + default: 25 + description: | + Maximum number of packets per rate_limit + type: number + NeutronL3AgentLoggingLocalOutputLogBase: + default: '' + description: | + Output logfile path on agent side, default syslog file + type: string + conditions: az_set: not: {equals: [{get_param: NeutronL3AgentAvailabilityZone}, '']} l3_agent_extensions_set: not: {equals : [{get_param: NeutronL3AgentExtensions}, "''"]} + network_log_local_output_log_base_set: + not: {equals : [{get_param: NeutronL3AgentLoggingLocalOutputLogBase}, '']} resources: ContainersCommon: @@ -209,6 +227,11 @@ outputs: - l3_agent_extensions_set - neutron::agents::l3::extensions: {get_param: NeutronL3AgentExtensions} - neutron::agents::l3::radvd_user: {get_param: NeutronL3AgentRadvdUser} + - neutron::agents::l3::network_log_rate_limit: {get_param: NeutronL3AgentLoggingRateLimit} + - neutron::agents::l3::network_log_burst_limit: {get_param: NeutronL3AgentLoggingBurstLimit} + - if: + - network_log_local_output_log_base_set + - neutron::agents::l3::network_log_local_output_log_base: {get_param: NeutronL3AgentLoggingLocalOutputLogBase} service_config_settings: map_merge: - get_attr: [NeutronBase, role_data, service_config_settings] diff --git a/deployment/neutron/neutron-ovs-agent-container-puppet.yaml b/deployment/neutron/neutron-ovs-agent-container-puppet.yaml index 0d984ad219..bd7c599bfc 100644 --- a/deployment/neutron/neutron-ovs-agent-container-puppet.yaml +++ b/deployment/neutron/neutron-ovs-agent-container-puppet.yaml @@ -141,6 +141,22 @@ parameters: type: boolean default: false + NeutronOVSAgentLoggingRateLimit: + default: 100 + description: | + Maximum number of packets logging per second + type: number + NeutronOVSAgentLoggingBurstLimit: + default: 25 + description: | + Maximum number of packets per rate_limit + type: number + NeutronOVSAgentLoggingLocalOutputLogBase: + default: '' + description: | + Output logfile path on agent side, default syslog file + type: string + conditions: firewall_driver_set: not: {equals : [{get_param: NeutronOVSFirewallDriver}, '']} @@ -148,6 +164,8 @@ conditions: not: {equals : [{get_param: NeutronEnableDVR}, '']} ethertypes_set: not: {equals : [{get_param: NeutronPermittedEthertypes}, []]} + network_log_local_output_log_base_set: + not: {equals : [{get_param: NeutronOVSAgentLoggingLocalOutputLogBase}, '']} resources: ContainersCommon: @@ -234,6 +252,11 @@ outputs: if: - ethertypes_set - {get_param: NeutronPermittedEthertypes} + - neutron::agents::ml2::ovs::network_log_rate_limit: {get_param: NeutronOVSAgentLoggingRateLimit} + - neutron::agents::ml2::ovs::network_log_burst_limit: {get_param: NeutronOVSAgentLoggingBurstLimit} + - if: + - network_log_local_output_log_base_set + - neutron::agents::ml2::ovs::network_log_local_output_log_base: {get_param: NeutronOVSAgentLoggingLocalOutputLogBase} service_config_settings: map_merge: diff --git a/deployment/neutron/neutron-plugin-ml2-ovn.yaml b/deployment/neutron/neutron-plugin-ml2-ovn.yaml index bd0ff5d278..6af0568dda 100644 --- a/deployment/neutron/neutron-plugin-ml2-ovn.yaml +++ b/deployment/neutron/neutron-plugin-ml2-ovn.yaml @@ -92,6 +92,23 @@ parameters: 'ovs-appctl -t ovs-vswitchd dpif/show-dp-features br-int | grep "Check pkt length action"'. + NeutronOVNLoggingRateLimit: + default: 100 + description: | + Maximum number of packets logging per second + type: number + NeutronOVNLoggingBurstLimit: + default: 25 + description: | + Maximum number of packets per rate_limit + type: number + NeutronOVNLoggingLocalOutputLogBase: + default: '' + description: | + Output logfile path on agent side, default syslog file + type: string + + conditions: neutron_dvr_set: not: {equals : [{get_param: NeutronEnableDVR}, '']} @@ -100,6 +117,8 @@ conditions: or: - {not: {equals: [{get_param: NeutronVhostuserSocketDir}, ""]}} - {not: {equals: [{get_param: [RoleParameters, NeutronVhostuserSocketDir]}, ""]}} + network_log_local_output_log_base_set: + not: {equals : [{get_param: NeutronOVNLoggingLocalOutputLogBase}, '']} resources: NeutronMl2Base: @@ -148,6 +167,11 @@ outputs: - values: {get_param: RoleParameters} - values: NeutronVhostuserSocketDir: {get_param: NeutronVhostuserSocketDir} + - neutron::agents::ml2::ovn::network_log_rate_limit: {get_param: NeutronOVNLoggingRateLimit} + - neutron::agents::ml2::ovn::network_log_burst_limit: {get_param: NeutronOVNLoggingBurstLimit} + - if: + - network_log_local_output_log_base_set + - neutron::agents::ml2::ovn::network_log_local_output_log_base: {get_param: NeutronOVNLoggingLocalOutputLogBase} step_config: | include tripleo::profile::base::neutron::plugins::ml2 metadata_settings: diff --git a/releasenotes/notes/neutron-logging-plugin-support-added-b2e1292d49e087c3.yaml b/releasenotes/notes/neutron-logging-plugin-support-added-b2e1292d49e087c3.yaml new file mode 100644 index 0000000000..0c98d2ebb7 --- /dev/null +++ b/releasenotes/notes/neutron-logging-plugin-support-added-b2e1292d49e087c3.yaml @@ -0,0 +1,12 @@ +--- +features: + - | + New config options for Neutron logging service plugin configuration were + added. There are options added for L3 Agent: + ``NeutronL3AgentLoggingRateLimit``, ``NeutronL3AgentLoggingBurstLimit``, + ``NeutronL3AgentLoggingLocalOutputLogBase``, for OVS agent: + ``NeutronOVSAgentLoggingRateLimit``, ``NeutronOVSAgentLoggingBurstLimit``, + ``NeutronOVSAgentLoggingLocalOutputLogBase`` and for ML2/OVN backend: + ``NeutronOVNLoggingRateLimit``, ``NeutronOVNLoggingBurstLimit``, + ``NeutronOVNLoggingLocalOutputLogBase``. +