Merge "Add keepalived-healthcheck-interval config option"
This commit is contained in:
commit
7a28689ccc
@ -366,3 +366,11 @@ options:
|
||||
description: |
|
||||
Manually disable lbaas services. Set this option to True if Octavia
|
||||
is used with neutron. This option is ignored for Train+ OpenStack.
|
||||
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.
|
||||
|
@ -175,6 +175,8 @@ class NeutronGatewayContext(NeutronAPIContext):
|
||||
'availability_zone': get_availability_zone(),
|
||||
'enable_nfg_logging': api_settings['enable_nfg_logging'],
|
||||
'ovsdb_timeout': config('ovsdb-timeout'),
|
||||
'keepalived_healthcheck_interval':
|
||||
config('keepalived-healthcheck-interval')
|
||||
}
|
||||
|
||||
ctxt['local_ip'] = get_local_ip()
|
||||
|
@ -30,8 +30,8 @@ gateway_external_network_id = {{ ext_net_id }}
|
||||
external_network_bridge = br-ex
|
||||
{% endif -%}
|
||||
agent_mode = {{ agent_mode }}
|
||||
{% if use_l3ha -%}
|
||||
ha_vrrp_health_check_interval = 30
|
||||
{% if use_l3ha and keepalived_healthcheck_interval -%}
|
||||
ha_vrrp_health_check_interval = {{ keepalived_healthcheck_interval }}
|
||||
{% endif -%}
|
||||
|
||||
[AGENT]
|
||||
|
@ -25,8 +25,8 @@ gateway_external_network_id = {{ ext_net_id }}
|
||||
external_network_bridge = br-ex
|
||||
{% endif -%}
|
||||
agent_mode = {{ agent_mode }}
|
||||
{% if use_l3ha -%}
|
||||
ha_vrrp_health_check_interval = 30
|
||||
{% if use_l3ha and keepalived_healthcheck_interval -%}
|
||||
ha_vrrp_health_check_interval = {{ keepalived_healthcheck_interval }}
|
||||
{% endif -%}
|
||||
|
||||
[AGENT]
|
||||
|
@ -25,8 +25,8 @@ gateway_external_network_id = {{ ext_net_id }}
|
||||
external_network_bridge = br-ex
|
||||
{% endif -%}
|
||||
agent_mode = {{ agent_mode }}
|
||||
{% if use_l3ha -%}
|
||||
ha_vrrp_health_check_interval = 30
|
||||
{% if use_l3ha and keepalived_healthcheck_interval -%}
|
||||
ha_vrrp_health_check_interval = {{ keepalived_healthcheck_interval }}
|
||||
{% endif -%}
|
||||
|
||||
[AGENT]
|
||||
|
@ -25,8 +25,8 @@ gateway_external_network_id = {{ ext_net_id }}
|
||||
external_network_bridge = br-ex
|
||||
{% endif -%}
|
||||
agent_mode = {{ agent_mode }}
|
||||
{% if use_l3ha -%}
|
||||
ha_vrrp_health_check_interval = 30
|
||||
{% if use_l3ha and keepalived_healthcheck_interval -%}
|
||||
ha_vrrp_health_check_interval = {{ keepalived_healthcheck_interval }}
|
||||
{% endif -%}
|
||||
|
||||
[AGENT]
|
||||
|
@ -204,6 +204,8 @@ class TestNeutronGatewayContext(CharmTestCase):
|
||||
|
||||
self.test_config.set('ovsdb-timeout', 10)
|
||||
|
||||
self.test_config.set('keepalived-healthcheck-interval', 0)
|
||||
|
||||
self.network_get_primary_address.side_effect = NotImplementedError
|
||||
self.unit_get.return_value = '10.5.0.1'
|
||||
# Provided by neutron-api relation
|
||||
@ -237,6 +239,7 @@ class TestNeutronGatewayContext(CharmTestCase):
|
||||
'nfg_log_output_base': '/var/log/firewall-logs',
|
||||
'nfg_log_rate_limit': 100,
|
||||
'ovsdb_timeout': 10,
|
||||
'keepalived_healthcheck_interval': 0,
|
||||
})
|
||||
|
||||
@patch.object(neutron_contexts, 'validate_nfg_log_path', lambda x: x)
|
||||
@ -299,6 +302,7 @@ class TestNeutronGatewayContext(CharmTestCase):
|
||||
'nfg_log_output_base': None,
|
||||
'nfg_log_rate_limit': None,
|
||||
'ovsdb_timeout': 60,
|
||||
'keepalived_healthcheck_interval': 30,
|
||||
})
|
||||
|
||||
@patch('os.environ.get')
|
||||
|
Loading…
Reference in New Issue
Block a user