Support setting rpc_response_max_timeout per agent

The rpc_response_max_timeout parameter can be set for specific agents.
This change allows configuring the parameter in agent config files so
that different values can be set for different agents.

Change-Id: I6a52a91fe0d18eb0cb4483cb5f5ca3b16fe6afb4
This commit is contained in:
Takashi Kajinami 2021-11-12 09:26:01 +09:00
parent 70fe4887a1
commit 5b76023947
15 changed files with 89 additions and 27 deletions

View File

@ -110,6 +110,10 @@
# can be used to override the reporting interval for the dhcp-agent.
# Defaults to $::os_service_default
#
# [*rpc_response_max_timeout*]
# (Optional) Maximum seconds to wait for a response from an RPC call
# Defaults to: $::os_service_default
#
class neutron::agents::dhcp (
$package_ensure = present,
$enabled = true,
@ -136,6 +140,7 @@ class neutron::agents::dhcp (
$ovsdb_agent_ssl_cert_file = $::os_service_default,
$ovsdb_agent_ssl_ca_file = $::os_service_default,
$report_interval = $::os_service_default,
$rpc_response_max_timeout = $::os_service_default,
) {
include neutron::deps
@ -172,6 +177,7 @@ class neutron::agents::dhcp (
'DEFAULT/dnsmasq_enable_addr6_list': value => $dnsmasq_enable_addr6_list;
'agent/availability_zone': value => $availability_zone;
'agent/report_interval': value => $report_interval;
'DEFAULT/rpc_response_max_timeout': value => $rpc_response_max_timeout;
}
# DEFAULT/ovs_intergation_bridge was deprecated in favor of

View File

@ -89,6 +89,10 @@
# can be used to override the reporting interval for l3-agent.
# Defaults to $::os_service_default
#
# [*rpc_response_max_timeout*]
# (Optional) Maximum seconds to wait for a response from an RPC call
# Defaults to: $::os_service_default
#
# [*radvd_user*]
# (optional) The username passed to radvd, used to drop root privileges and
# change user ID to username and group ID to the primary group of username.
@ -144,6 +148,7 @@ class neutron::agents::l3 (
$availability_zone = $::os_service_default,
$extensions = $::os_service_default,
$report_interval = $::os_service_default,
$rpc_response_max_timeout = $::os_service_default,
$radvd_user = $::os_service_default,
$ovs_integration_bridge = $::os_service_default,
$network_log_rate_limit = $::os_service_default,
@ -196,6 +201,7 @@ class neutron::agents::l3 (
'agent/availability_zone': value => $availability_zone;
'agent/extensions': value => join(any2array($extensions), ',');
'agent/report_interval': value => $report_interval;
'DEFAULT/rpc_response_max_timeout': value => $rpc_response_max_timeout;
'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;

View File

@ -64,6 +64,10 @@
# can be used to override the reporting interval for the sriov-agent.
# Defaults to $::os_service_default
#
# [*rpc_response_max_timeout*]
# (Optional) Maximum seconds to wait for a response from an RPC call
# Defaults to: $::os_service_default
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
# in the metadata config.
@ -86,6 +90,7 @@ class neutron::agents::metadata (
$nova_client_cert = $::os_service_default,
$nova_client_priv_key = $::os_service_default,
$report_interval = $::os_service_default,
$rpc_response_max_timeout = $::os_service_default,
$purge_config = false,
) {
@ -109,6 +114,7 @@ class neutron::agents::metadata (
'DEFAULT/nova_client_cert': value => $nova_client_cert;
'DEFAULT/nova_client_priv_key': value => $nova_client_priv_key;
'agent/report_interval': value => $report_interval;
'DEFAULT/rpc_response_max_timeout': value => $rpc_response_max_timeout;
}
if ! is_service_default ($metadata_memory_cache_ttl) and ($metadata_memory_cache_ttl) {

View File

@ -48,6 +48,10 @@
# (optional) Interval between two metering reports.
# Defaults to 300.
#
# [*rpc_response_max_timeout*]
# (Optional) Maximum seconds to wait for a response from an RPC call
# Defaults to: $::os_service_default
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
# in the metering config.
@ -55,15 +59,16 @@
#
class neutron::agents::metering (
$package_ensure = present,
$enabled = true,
$manage_service = true,
$debug = $::os_service_default,
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$driver = 'neutron.services.metering.drivers.noop.noop_driver.NoopMeteringDriver',
$measure_interval = $::os_service_default,
$report_interval = $::os_service_default,
$purge_config = false,
$package_ensure = present,
$enabled = true,
$manage_service = true,
$debug = $::os_service_default,
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$driver = 'neutron.services.metering.drivers.noop.noop_driver.NoopMeteringDriver',
$measure_interval = $::os_service_default,
$report_interval = $::os_service_default,
$rpc_response_max_timeout = $::os_service_default,
$purge_config = false,
) {
include neutron::deps
@ -77,11 +82,12 @@ class neutron::agents::metering (
# This only lists config specific to the agent. neutron.conf supplies
# the rest.
neutron_metering_agent_config {
'DEFAULT/debug': value => $debug;
'DEFAULT/interface_driver': value => $interface_driver;
'DEFAULT/driver': value => $driver;
'DEFAULT/measure_interval': value => $measure_interval;
'DEFAULT/report_interval': value => $report_interval;
'DEFAULT/debug': value => $debug;
'DEFAULT/interface_driver': value => $interface_driver;
'DEFAULT/driver': value => $driver;
'DEFAULT/measure_interval': value => $measure_interval;
'DEFAULT/report_interval': value => $report_interval;
'DEFAULT/rpc_response_max_timeout': value => $rpc_response_max_timeout;
}
if $::neutron::params::metering_agent_package {

View File

@ -44,6 +44,10 @@
# polling for local device changes.
# Defaults to 2.
#
# [*rpc_response_max_timeout*]
# (Optional) Maximum seconds to wait for a response from an RPC call
# Defaults to: $::os_service_default
#
# [*l2_population*]
# (optional) Extension to use alongside ml2 plugin's l2population
# mechanism driver. It enables the plugin to populate VXLAN forwarding table.
@ -68,20 +72,21 @@
# Defaults to false.
#
class neutron::agents::ml2::linuxbridge (
$package_ensure = 'present',
$enabled = true,
$manage_service = true,
$tunnel_types = [],
$local_ip = false,
$vxlan_group = $::os_service_default,
$vxlan_ttl = $::os_service_default,
$vxlan_tos = $::os_service_default,
$polling_interval = $::os_service_default,
$l2_population = $::os_service_default,
$package_ensure = 'present',
$enabled = true,
$manage_service = true,
$tunnel_types = [],
$local_ip = false,
$vxlan_group = $::os_service_default,
$vxlan_ttl = $::os_service_default,
$vxlan_tos = $::os_service_default,
$polling_interval = $::os_service_default,
$rpc_response_max_timeout = $::os_service_default,
$l2_population = $::os_service_default,
$physical_interface_mappings = [],
$bridge_mappings = [],
$firewall_driver = 'iptables',
$purge_config = false,
$bridge_mappings = [],
$firewall_driver = 'iptables',
$purge_config = false,
) {
validate_legacy(Array, 'validate_array', $tunnel_types)
@ -137,6 +142,7 @@ class neutron::agents::ml2::linuxbridge (
neutron_agent_linuxbridge {
'agent/polling_interval': value => $polling_interval;
'DEFAULT/rpc_response_max_timeout': value => $rpc_response_max_timeout;
'linux_bridge/physical_interface_mappings': value => join($physical_interface_mappings, ',');
}

View File

@ -93,6 +93,10 @@
# can be used to override the reporting interval for the openvswitch-agent.
# Defaults to $::os_service_default
#
# [*rpc_response_max_timeout*]
# (Optional) Maximum seconds to wait for a response from an RPC call
# Defaults to: $::os_service_default
#
# [*l2_population*]
# (optional) Extension to use alongside ml2 plugin's l2population
# mechanism driver.
@ -245,6 +249,7 @@ class neutron::agents::ml2::ovs (
$vxlan_udp_port = 4789,
$polling_interval = $::os_service_default,
$report_interval = $::os_service_default,
$rpc_response_max_timeout = $::os_service_default,
$l2_population = $::os_service_default,
$arp_responder = $::os_service_default,
$firewall_driver = 'iptables_hybrid',
@ -378,6 +383,7 @@ class neutron::agents::ml2::ovs (
neutron_agent_ovs {
'agent/polling_interval': value => $polling_interval;
'agent/report_interval': value => $report_interval;
'DEFAULT/rpc_response_max_timeout': value => $rpc_response_max_timeout;
'agent/l2_population': value => $l2_population;
'agent/arp_responder': value => $arp_responder;
'agent/enable_distributed_routing': value => $enable_distributed_routing;

View File

@ -40,6 +40,10 @@
# interfaces on each agent.
# Value should be of type array, Defaults to $::os_service_default
#
# [*rpc_response_max_timeout*]
# (Optional) Maximum seconds to wait for a response from an RPC call
# Defaults to: $::os_service_default
#
# [*polling_interval*]
# (optional) The number of seconds the agent will wait between
# polling for local device changes.
@ -93,6 +97,7 @@ class neutron::agents::ml2::sriov (
$enabled = true,
$manage_service = true,
$physical_device_mappings = $::os_service_default,
$rpc_response_max_timeout = $::os_service_default,
$polling_interval = 2,
$report_interval = $::os_service_default,
$exclude_devices = $::os_service_default,
@ -115,6 +120,7 @@ class neutron::agents::ml2::sriov (
'sriov_nic/exclude_devices': value => pick(join(any2array($exclude_devices), ','), $::os_service_default);
'sriov_nic/physical_device_mappings': value => pick(join(any2array($physical_device_mappings), ','), $::os_service_default);
'agent/extensions': value => join(any2array($extensions), ',');
'DEFAULT/rpc_response_max_timeout': value => $rpc_response_max_timeout;
'agent/polling_interval': value => $polling_interval;
'agent/report_interval': value => $report_interval;
# As of now security groups are not supported for SR-IOV ports.

View File

@ -0,0 +1,13 @@
---
features:
- |
Now the following classes support the ``rpc_response_max_timeout``
parameter.
- ``neutron::agents::dhcp``
- ``neutron::agents::metadata``
- ``neutron::agents::metering``
- ``neutron::agents::l3``
- ``neutron::agents::ml2::linuxbridge``
- ``neutron::agents::ml2::ovs``
- ``neutron::agents::ml2::sriov``

View File

@ -45,6 +45,7 @@ describe 'neutron::agents::dhcp' do
should contain_neutron_dhcp_agent_config('DEFAULT/dnsmasq_enable_addr6_list').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('agent/availability_zone').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('agent/report_interval').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('DEFAULT/rpc_response_max_timeout').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('OVS/ovsdb_connection').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('OVS/integration_bridge').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('OVS/ssl_key_file').with_value('<SERVICE DEFAULT>');

View File

@ -45,6 +45,7 @@ describe 'neutron::agents::l3' do
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/report_interval').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('DEFAULT/rpc_response_max_timeout').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>')

View File

@ -59,6 +59,7 @@ describe 'neutron::agents::metadata' do
should contain_neutron_metadata_agent_config('DEFAULT/metadata_proxy_shared_secret').with(:value => params[:shared_secret]).with_secret(true)
should contain_neutron_metadata_agent_config('DEFAULT/cache_url').with(:ensure => 'absent')
should contain_neutron_metadata_agent_config('agent/report_interval').with(:value => '<SERVICE DEFAULT>')
should contain_neutron_metadata_agent_config('DEFAULT/rpc_response_max_timeout').with(:value => '<SERVICE DEFAULT>')
end
end

View File

@ -60,6 +60,7 @@ describe 'neutron::agents::metering' do
should contain_neutron_metering_agent_config('DEFAULT/driver').with_value(p[:driver]);
should contain_neutron_metering_agent_config('DEFAULT/measure_interval').with_value('<SERVICE DEFAULT>');
should contain_neutron_metering_agent_config('DEFAULT/report_interval').with_value('<SERVICE DEFAULT>');
should contain_neutron_metering_agent_config('DEFAULT/rpc_response_max_timeout').with_value('<SERVICE DEFAULT>');
end
it 'installs neutron metering agent package' do

View File

@ -33,6 +33,7 @@ describe 'neutron::agents::ml2::linuxbridge' do
end
it 'configures ml2_conf.ini' do
should contain_neutron_agent_linuxbridge('DEFAULT/rpc_response_max_timeout').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_linuxbridge('agent/polling_interval').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_linuxbridge('linux_bridge/physical_interface_mappings').with_value(default_params[:physical_interface_mappings].join(','))
should contain_neutron_agent_linuxbridge('linux_bridge/bridge_mappings').with_ensure('absent')

View File

@ -42,6 +42,7 @@ describe 'neutron::agents::ml2::ovs' do
it 'configures plugins/ml2/openvswitch_agent.ini' do
should contain_neutron_agent_ovs('agent/polling_interval').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('agent/report_interval').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('DEFAULT/rpc_response_max_timeout').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('agent/l2_population').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('agent/arp_responder').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('agent/drop_flows_on_start').with_value(p[:drop_flows_on_start])

View File

@ -39,6 +39,7 @@ describe 'neutron::agents::ml2::sriov' do
should contain_neutron_sriov_agent_config('agent/extensions').with_value(['<SERVICE DEFAULT>'])
should contain_neutron_sriov_agent_config('agent/polling_interval').with_value(p[:polling_interval])
should contain_neutron_sriov_agent_config('agent/report_interval').with_value('<SERVICE DEFAULT>')
should contain_neutron_sriov_agent_config('DEFAULT/rpc_response_max_timeout').with_value('<SERVICE DEFAULT>')
should contain_neutron_sriov_agent_config('securitygroup/firewall_driver').with_value('noop')
end