Add report_inteval parameter in ml2 baremetal

Add the parameter $report_interval to the ml2
networking-baremetal manifest. By default the global
report_interval as defined in neutron.conf is used.

In some cases it makes sense to change the report_interval
specifically for ironic-neutron-agent.

Related-Bug: #1940838
Change-Id: I6fc0eb085c09fb1e24ff09d4f8199d2cf57dd209
This commit is contained in:
Harald Jensås 2021-08-26 15:33:19 +02:00
parent a9f9d3e238
commit dae33092a1
3 changed files with 17 additions and 0 deletions

View File

@ -85,6 +85,13 @@
# ironic-neutron-agent config.
# Defaults to false.
#
# [*report_interval*]
# (optional) Set the agent report interval. By default the global report
# interval in neutron.conf ([agent]/report_interval) is used. This parameter
# can be used to override the reporting interval for the
# ironic-neutron-agent.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*auth_strategy*]
@ -124,6 +131,7 @@ class neutron::agents::ml2::networking_baremetal (
$status_code_retry_delay = $::os_service_default,
$status_code_retries = $::os_service_default,
$purge_config = false,
$report_interval = $::os_service_default,
# DEPRECATED PARAMETERS
$auth_strategy = undef,
$ironic_url = undef,
@ -190,6 +198,7 @@ Use status_code_retries instead.')
'ironic/region_name': value => $region_name;
'ironic/status_code_retry_delay': value => $status_code_retry_delay_real;
'ironic/status_code_retries': value => $status_code_retries_real;
'agent/report_interval': value => $report_interval;
}
package { 'python-ironic-neutron-agent':

View File

@ -0,0 +1,7 @@
---
features:
- |
It is now possible to set the report interval for the networking-baremetal
ml2 agent by using new parameter ``report_interval`` in the
``neutron::agents::ml2::networking_baremetal`` class.

View File

@ -50,6 +50,7 @@ describe 'neutron::agents::ml2::networking_baremetal' do
should contain_ironic_neutron_agent_config('ironic/region_name').with_value('<SERVICE DEFAULT>')
should contain_ironic_neutron_agent_config('ironic/status_code_retry_delay').with_value('<SERVICE DEFAULT>')
should contain_ironic_neutron_agent_config('ironic/status_code_retries').with_value('<SERVICE DEFAULT>')
should contain_ironic_neutron_agent_config('agent/report_interval').with_value('<SERVICE DEFAULT>')
end
it 'installs ironic-neutron-agent agent package' do