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.

Conflicts:
  manifests/agents/ml2/networking_baremetal.pp
  spec/classes/neutron_agents_ml2_networking_baremetal_spec.rb

Backport note to stable/train:
Resolved additional conflicts caused by
dfeccd6749

Related-Bug: #1940838
Change-Id: I6fc0eb085c09fb1e24ff09d4f8199d2cf57dd209
(cherry picked from commit dae33092a1)
(cherry picked from commit 41bcf66eaf)
(cherry picked from commit 629dbe0f1e)
(cherry picked from commit b9f3a4baa6)
This commit is contained in:
Harald Jensås 2021-08-26 15:33:19 +02:00 committed by Takashi Kajinami
parent 914b228944
commit b793bbfc69
3 changed files with 17 additions and 0 deletions

View File

@ -98,6 +98,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
#
class neutron::agents::ml2::networking_baremetal (
$password,
$enabled = true,
@ -121,6 +128,7 @@ class neutron::agents::ml2::networking_baremetal (
$retry_interval = $::os_service_default,
$max_retries = $::os_service_default,
$purge_config = false,
$report_interval = $::os_service_default,
) {
include ::neutron::deps
@ -154,6 +162,7 @@ class neutron::agents::ml2::networking_baremetal (
'ironic/region_name': value => $region_name;
'ironic/retry_interval': value => $retry_interval;
'ironic/max_retries': value => $max_retries;
'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

@ -55,6 +55,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/retry_interval').with_value('<SERVICE DEFAULT>')
should contain_ironic_neutron_agent_config('ironic/max_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