Browse Source

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 commit 61f4fc966b)
(cherry picked from commit bd97629f73)
(cherry picked from commit 0c3973b179)
(cherry picked from commit cb475f8e4d)
changes/05/813605/1
Slawek Kaplonski 10 months ago
parent
commit
d462f9bee2
  1. 87
      manifests/agents/l3.pp
  2. 99
      manifests/agents/ml2/ovs.pp
  3. 93
      manifests/plugins/ml2/ovn.pp
  4. 9
      releasenotes/notes/logging-service-plugin-params-c765f0d55b0b7d92.yaml
  5. 3
      spec/classes/neutron_agents_l3_spec.rb
  6. 3
      spec/classes/neutron_agents_ml2_ovs_spec.rb
  7. 4
      spec/classes/neutron_plugins_ml2_ovn_spec.rb

87
manifests/agents/l3.pp

@ -94,27 +94,47 @@
# "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,
$manage_service = true,
$debug = $::os_service_default,
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$gateway_external_network_id = $::os_service_default,
$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,
$package_ensure = 'present',
$enabled = true,
$manage_service = true,
$debug = $::os_service_default,
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$gateway_external_network_id = $::os_service_default,
$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,
$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
@ -133,18 +153,21 @@ class neutron::agents::l3 (
}
neutron_l3_agent_config {
'DEFAULT/debug': value => $debug;
'DEFAULT/interface_driver': value => $interface_driver;
'DEFAULT/gateway_external_network_id': value => $gateway_external_network_id;
'DEFAULT/handle_internal_only_routers': value => $handle_internal_only_routers;
'DEFAULT/metadata_port': value => $metadata_port;
'DEFAULT/periodic_interval': value => $periodic_interval;
'DEFAULT/periodic_fuzzy_delay': value => $periodic_fuzzy_delay;
'DEFAULT/enable_metadata_proxy': value => $enable_metadata_proxy;
'DEFAULT/agent_mode': value => $agent_mode;
'DEFAULT/radvd_user': value => $radvd_user;
'agent/availability_zone': value => $availability_zone;
'agent/extensions': value => join(any2array($extensions), ',');
'DEFAULT/debug': value => $debug;
'DEFAULT/interface_driver': value => $interface_driver;
'DEFAULT/gateway_external_network_id': value => $gateway_external_network_id;
'DEFAULT/handle_internal_only_routers': value => $handle_internal_only_routers;
'DEFAULT/metadata_port': value => $metadata_port;
'DEFAULT/periodic_interval': value => $periodic_interval;
'DEFAULT/periodic_fuzzy_delay': value => $periodic_fuzzy_delay;
'DEFAULT/enable_metadata_proxy': value => $enable_metadata_proxy;
'DEFAULT/agent_mode': value => $agent_mode;
'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 {

99
manifests/agents/ml2/ovs.pp

@ -199,51 +199,71 @@
# 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*]
# (optional) This option is deprecated an has no effect
#
class neutron::agents::ml2::ovs (
$package_ensure = 'present',
$enabled = true,
$manage_service = true,
$extensions = $::os_service_default,
$bridge_uplinks = [],
$bridge_mappings = [],
$ovsdb_timeout = $::os_service_default,
$of_connect_timeout = $::os_service_default,
$of_request_timeout = $::os_service_default,
$of_inactivity_probe = $::os_service_default,
$integration_bridge = 'br-int',
$tunnel_types = [],
$local_ip = false,
$tunnel_bridge = 'br-tun',
$vxlan_udp_port = 4789,
$polling_interval = $::os_service_default,
$l2_population = $::os_service_default,
$arp_responder = $::os_service_default,
$firewall_driver = 'iptables_hybrid',
$enable_distributed_routing = $::os_service_default,
$drop_flows_on_start = false,
$manage_vswitch = true,
$int_peer_patch_port = $::os_service_default,
$tun_peer_patch_port = $::os_service_default,
$datapath_type = $::os_service_default,
$vhostuser_socket_dir = $::os_service_default,
$ovsdb_interface = $::os_service_default,
$purge_config = false,
$enable_dpdk = false,
$enable_security_group = $::os_service_default,
$permitted_ethertypes = $::os_service_default,
$minimize_polling = $::os_service_default,
$tunnel_csum = $::os_service_default,
$igmp_snooping_enable = $::os_service_default,
$resource_provider_bandwidths = [],
$resource_provider_hypervisors = [],
$explicitly_egress_direct = $::os_service_default,
$package_ensure = 'present',
$enabled = true,
$manage_service = true,
$extensions = $::os_service_default,
$bridge_uplinks = [],
$bridge_mappings = [],
$ovsdb_timeout = $::os_service_default,
$of_connect_timeout = $::os_service_default,
$of_request_timeout = $::os_service_default,
$of_inactivity_probe = $::os_service_default,
$integration_bridge = 'br-int',
$tunnel_types = [],
$local_ip = false,
$tunnel_bridge = 'br-tun',
$vxlan_udp_port = 4789,
$polling_interval = $::os_service_default,
$l2_population = $::os_service_default,
$arp_responder = $::os_service_default,
$firewall_driver = 'iptables_hybrid',
$enable_distributed_routing = $::os_service_default,
$drop_flows_on_start = false,
$manage_vswitch = true,
$int_peer_patch_port = $::os_service_default,
$tun_peer_patch_port = $::os_service_default,
$datapath_type = $::os_service_default,
$vhostuser_socket_dir = $::os_service_default,
$ovsdb_interface = $::os_service_default,
$purge_config = false,
$enable_dpdk = false,
$enable_security_group = $::os_service_default,
$permitted_ethertypes = $::os_service_default,
$minimize_polling = $::os_service_default,
$tunnel_csum = $::os_service_default,
$igmp_snooping_enable = $::os_service_default,
$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,
$of_interface = undef,
) {
include ::neutron::deps
@ -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 {

93
manifests/plugins/ml2/ovn.pp

@ -101,26 +101,46 @@
# 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,
$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_l3_mode = $::os_service_default,
$vif_type = $::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_l3_mode = $::os_service_default,
$vif_type = $::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,
) {
include ::neutron::deps
@ -146,22 +166,25 @@ 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_l3_mode' : value => $ovn_l3_mode;
'ovn/vif_type' : value => $vif_type;
'ovn/ovn_metadata_enabled' : value => $ovn_metadata_enabled;
'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_l3_mode' : value => $ovn_l3_mode;
'ovn/vif_type' : value => $vif_type;
'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/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;
}
}

9
releasenotes/notes/logging-service-plugin-params-c765f0d55b0b7d92.yaml

@ -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``

3
spec/classes/neutron_agents_l3_spec.rb

@ -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

3
spec/classes/neutron_agents_ml2_ovs_spec.rb

@ -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

4
spec/classes/neutron_plugins_ml2_ovn_spec.rb

@ -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…
Cancel
Save