Make advertisement intervals for radvd configurable
Currently a global setting that is applied for all managed radvd processes. Per-process setting could be done in the future. For large clouds, it may be useful to increase the intervals, to reduce multicast storms. Co-Authored-By: Brian Haley <brian.haley@hpe.com> DocImpact Router advertisement intervals for radvd are now configurable Related-Bug: #1532338 Change-Id: I6cc313599f0ee12f7d51d073a22321221fca263f
This commit is contained in:
parent
d6d43b32ca
commit
d9e4d20da8
@ -38,13 +38,19 @@ OPTS = [
|
||||
cfg.StrOpt('ra_confs',
|
||||
default='$state_path/ra',
|
||||
help=_('Location to store IPv6 RA config files')),
|
||||
cfg.IntOpt('min_rtr_adv_interval',
|
||||
default=3,
|
||||
help=_('MinRtrAdvInterval setting for radvd.conf')),
|
||||
cfg.IntOpt('max_rtr_adv_interval',
|
||||
default=10,
|
||||
help=_('MaxRtrAdvInterval setting for radvd.conf')),
|
||||
]
|
||||
|
||||
CONFIG_TEMPLATE = jinja2.Template("""interface {{ interface_name }}
|
||||
{
|
||||
AdvSendAdvert on;
|
||||
MinRtrAdvInterval 3;
|
||||
MaxRtrAdvInterval 10;
|
||||
MinRtrAdvInterval {{ min_rtr_adv_interval }};
|
||||
MaxRtrAdvInterval {{ max_rtr_adv_interval }};
|
||||
|
||||
{% if constants.DHCPV6_STATELESS in ra_modes %}
|
||||
AdvOtherConfigFlag on;
|
||||
@ -106,7 +112,9 @@ class DaemonMonitor(object):
|
||||
interface_name=interface_name,
|
||||
prefixes=auto_config_prefixes,
|
||||
dns_servers=dns_servers[0:MAX_RDNSS_ENTRIES],
|
||||
constants=constants))
|
||||
constants=constants,
|
||||
min_rtr_adv_interval=self._agent_conf.min_rtr_adv_interval,
|
||||
max_rtr_adv_interval=self._agent_conf.max_rtr_adv_interval))
|
||||
|
||||
common_utils.replace_file(radvd_conf, buf.getvalue())
|
||||
return radvd_conf
|
||||
|
@ -2246,6 +2246,20 @@ class TestBasicRouterOperations(BasicRouterOperationsFramework):
|
||||
assertFlag(managed_flag)('AdvManagedFlag on;',
|
||||
self.utils_replace_file.call_args[0][1])
|
||||
|
||||
def test_generate_radvd_intervals(self):
|
||||
self.conf.set_override('min_rtr_adv_interval', 22)
|
||||
self.conf.set_override('max_rtr_adv_interval', 66)
|
||||
router = l3_test_common.prepare_router_data()
|
||||
ipv6_subnet_modes = [{'ra_mode': l3_constants.IPV6_SLAAC,
|
||||
'address_mode': l3_constants.IPV6_SLAAC}]
|
||||
ri = self._process_router_ipv6_subnet_added(router,
|
||||
ipv6_subnet_modes)
|
||||
ri.radvd._generate_radvd_conf(router[l3_constants.INTERFACE_KEY])
|
||||
self.assertIn("MinRtrAdvInterval 22",
|
||||
self.utils_replace_file.call_args[0][1])
|
||||
self.assertIn("MaxRtrAdvInterval 66",
|
||||
self.utils_replace_file.call_args[0][1])
|
||||
|
||||
def test_generate_radvd_rdnss_conf(self):
|
||||
router = l3_test_common.prepare_router_data()
|
||||
ipv6_subnet_modes = [{'ra_mode': l3_constants.IPV6_SLAAC,
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- Prior to Mitaka, the settings that control the frequency of
|
||||
router advertisements transmitted by the radvd daemon were
|
||||
not able to be adjusted. Larger deployments may wish to decrease
|
||||
the frequency in which radvd sends multicast traffic. The 'min_rtr_adv_interval'
|
||||
and 'max_rtr_adv_interval' settings in the L3 agent configuration file
|
||||
map directly to the 'MinRtrAdvInterval' and 'MaxRtrAdvInterval' in the generated
|
||||
radvd.conf file. Consult the manpage for radvd.conf for more detailed information.
|
Loading…
Reference in New Issue
Block a user