Add keepalived-healthcheck-interval config option
Defaults to 30s (i.e. enabled) but also allows disabling healthchecks by setting to 0. Change-Id: I5bb7d362f0d957237e24f79f1f82583661bed470 Closes-Bug: #1890900
This commit is contained in:
parent
4b6385b7cd
commit
5d83c2c702
@ -394,3 +394,12 @@ options:
|
||||
order to support kernels with limited namespace support. i.e. Trusty.
|
||||
Changing the value after neutron DHCP agents are created will break
|
||||
access. The charm will go into a blocked state if this is attempted.
|
||||
keepalived-healthcheck-interval:
|
||||
type: int
|
||||
default: 30
|
||||
description: |
|
||||
By default all HA routers will check their external network gateway
|
||||
by sending a ping and if that fails they trigger a vrrp transition. This
|
||||
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.
|
||||
|
@ -201,6 +201,8 @@ class OVSPluginContext(context.NeutronContext):
|
||||
ovs_ctxt['debug'] = conf['debug']
|
||||
ovs_ctxt['prevent_arp_spoofing'] = conf['prevent-arp-spoofing']
|
||||
ovs_ctxt['enable_dpdk'] = conf['enable-dpdk']
|
||||
ovs_ctxt['keepalived_healthcheck_interval'] = \
|
||||
conf['keepalived-healthcheck-interval']
|
||||
|
||||
net_dev_mtu = neutron_api_settings.get('network_device_mtu')
|
||||
if net_dev_mtu:
|
||||
|
@ -11,6 +11,6 @@ agent_mode = {{ agent_mode }}
|
||||
gateway_external_network_id =
|
||||
external_network_bridge =
|
||||
{% endif %}
|
||||
{% if use_l3ha and agent_mode == 'dvr_snat' -%}
|
||||
ha_vrrp_health_check_interval = 30
|
||||
{% if use_l3ha and agent_mode == 'dvr_snat' and keepalived_healthcheck_interval -%}
|
||||
ha_vrrp_health_check_interval = {{ keepalived_healthcheck_interval }}
|
||||
{% endif %}
|
||||
|
@ -11,8 +11,8 @@ agent_mode = {{ agent_mode }}
|
||||
gateway_external_network_id =
|
||||
external_network_bridge =
|
||||
{% endif %}
|
||||
{% if use_l3ha and agent_mode == 'dvr_snat' -%}
|
||||
ha_vrrp_health_check_interval = 30
|
||||
{% if use_l3ha and agent_mode == 'dvr_snat' and keepalived_healthcheck_interval -%}
|
||||
ha_vrrp_health_check_interval = {{ keepalived_healthcheck_interval }}
|
||||
{% endif %}
|
||||
|
||||
[AGENT]
|
||||
|
@ -12,6 +12,9 @@ agent_mode = {{ agent_mode }}
|
||||
gateway_external_network_id =
|
||||
external_network_bridge =
|
||||
{% endif %}
|
||||
{% if use_l3ha and agent_mode == 'dvr_snat' and keepalived_healthcheck_interval -%}
|
||||
ha_vrrp_health_check_interval = {{ keepalived_healthcheck_interval }}
|
||||
{% endif %}
|
||||
|
||||
[AGENT]
|
||||
extensions = {{ l3_extension_plugins }}
|
||||
|
@ -133,7 +133,8 @@ class OVSPluginContextTest(CharmTestCase):
|
||||
'enable-dpdk': False,
|
||||
'security-group-log-output-base': '/var/log/nsg.log',
|
||||
'security-group-log-rate-limit': None,
|
||||
'security-group-log-burst-limit': 25}
|
||||
'security-group-log-burst-limit': 25,
|
||||
'keepalived-healthcheck-interval': 0}
|
||||
|
||||
def mock_config(key=None):
|
||||
if key:
|
||||
@ -191,6 +192,7 @@ class OVSPluginContextTest(CharmTestCase):
|
||||
'nsg_log_output_base': '/var/log/nsg.log',
|
||||
'nsg_log_rate_limit': None,
|
||||
'nsg_log_burst_limit': 25,
|
||||
'keepalived_healthcheck_interval': 0,
|
||||
}
|
||||
self.assertEqual(expect, napi_ctxt())
|
||||
|
||||
@ -271,6 +273,7 @@ class OVSPluginContextTest(CharmTestCase):
|
||||
'nsg_log_output_base': None,
|
||||
'nsg_log_rate_limit': None,
|
||||
'nsg_log_burst_limit': 25,
|
||||
'keepalived_healthcheck_interval': 30,
|
||||
}
|
||||
self.maxDiff = None
|
||||
self.assertEqual(expect, napi_ctxt())
|
||||
|
Loading…
Reference in New Issue
Block a user