config option to set of_inactivity_probe
This patch adds support for setting of-inactivity-probe in /etc/neutron/plugins/ml2/openvswitch_agent.ini [ovs] of_inactivity_probe = 10 Change-Id: Idb3ab6b0e82200226e3063065192b4346d0c5206 Closes-Bug: 1852582
This commit is contained in:
parent
916f109e2f
commit
6f7a915b9b
@ -403,3 +403,10 @@ options:
|
||||
option defines how frequently this check is performed. Setting this value
|
||||
to 0 will disable the healthchecks. Note that this only applies when
|
||||
using l3ha and dvr_snat.
|
||||
of-inactivity-probe:
|
||||
type: int
|
||||
default: 10
|
||||
description: |
|
||||
The inactivity_probe interval in seconds for the local switch connection
|
||||
to the controller. A value of 0 disables inactivity probes. Used only
|
||||
for 'native' driver. The default value is 10 seconds.
|
@ -259,6 +259,8 @@ class OVSPluginContext(context.NeutronContext):
|
||||
if ovs_ctxt['firewall_driver'] != OPENVSWITCH:
|
||||
ovs_ctxt['enable_nsg_logging'] = False
|
||||
|
||||
ovs_ctxt['of_inactivity_probe'] = config('of-inactivity-probe')
|
||||
|
||||
return ovs_ctxt
|
||||
|
||||
|
||||
|
@ -12,6 +12,7 @@ bridge_mappings = {{ bridge_mappings }}
|
||||
datapath_type = netdev
|
||||
vhostuser_socket_dir = /run/libvirt-vhost-user
|
||||
{% endif -%}
|
||||
of_inactivity_probe = {{ of_inactivity_probe }}
|
||||
|
||||
[agent]
|
||||
tunnel_types = {{ overlay_network_type }}
|
||||
|
@ -134,7 +134,8 @@ class OVSPluginContextTest(CharmTestCase):
|
||||
'security-group-log-output-base': '/var/log/nsg.log',
|
||||
'security-group-log-rate-limit': None,
|
||||
'security-group-log-burst-limit': 25,
|
||||
'keepalived-healthcheck-interval': 0}
|
||||
'keepalived-healthcheck-interval': 0,
|
||||
'of-inactivity-probe': 10}
|
||||
|
||||
def mock_config(key=None):
|
||||
if key:
|
||||
@ -193,6 +194,7 @@ class OVSPluginContextTest(CharmTestCase):
|
||||
'nsg_log_rate_limit': None,
|
||||
'nsg_log_burst_limit': 25,
|
||||
'keepalived_healthcheck_interval': 0,
|
||||
'of_inactivity_probe': 10,
|
||||
}
|
||||
self.assertEqual(expect, napi_ctxt())
|
||||
|
||||
@ -274,6 +276,7 @@ class OVSPluginContextTest(CharmTestCase):
|
||||
'nsg_log_rate_limit': None,
|
||||
'nsg_log_burst_limit': 25,
|
||||
'keepalived_healthcheck_interval': 30,
|
||||
'of_inactivity_probe': 10,
|
||||
}
|
||||
self.maxDiff = None
|
||||
self.assertEqual(expect, napi_ctxt())
|
||||
|
Loading…
x
Reference in New Issue
Block a user