# Use broadcast in DHCP replies
# dhcp_broadcast_reply = False
-# dhcp_delete_namespaces, which is false by default, can be set to True if
-# namespaces can be deleted cleanly on the host running the dhcp agent.
-# Do not enable this until you understand the problem with the Linux iproute
-# utility mentioned in https://bugs.launchpad.net/neutron/+bug/1052535 and
-# you are sure that your version of iproute does not suffer from the problem.
-# If True, namespaces will be deleted when a dhcp server is disabled.
-# dhcp_delete_namespaces = False
+# dhcp_delete_namespaces, which is True by default, can be set to False if
+# namespaces can't be deleted cleanly on the host running the DHCP agent.
+# Disable this if you hit the issue in
+# https://bugs.launchpad.net/neutron/+bug/1052535 or if
+# you are sure that your version of iproute suffers from the problem.
+# dhcp_delete_namespaces = True
# Timeout for ovs-vsctl commands.
# If the timeout expires, ovs commands will fail with ALARMCLOCK error.
# Iptables mangle mark used to mark ingress from external network
# external_ingress_mark = 0x2
-# router_delete_namespaces, which is false by default, can be set to True if
-# namespaces can be deleted cleanly on the host running the L3 agent.
-# Do not enable this until you understand the problem with the Linux iproute
-# utility mentioned in https://bugs.launchpad.net/neutron/+bug/1052535 and
-# you are sure that your version of iproute does not suffer from the problem.
+# router_delete_namespaces, which is True by default, can be set to False if
+# namespaces can't be deleted cleanly on the host running the L3 agent.
+# Disable this if you hit the issue in
+# https://bugs.launchpad.net/neutron/+bug/1052535 or if
+# you are sure that your version of iproute suffers from the problem.
# If True, namespaces will be deleted when a router is destroyed.
-# router_delete_namespaces = False
+# router_delete_namespaces = True
# Timeout for ovs-vsctl commands.
# If the timeout expires, ovs commands will fail with ALARMCLOCK error.
help=_('Comma-separated list of the DNS servers which will be '
'used as forwarders.'),
deprecated_name='dnsmasq_dns_server'),
- cfg.BoolOpt('dhcp_delete_namespaces', default=False,
+ cfg.BoolOpt('dhcp_delete_namespaces', default=True,
help=_("Delete namespace after removing a dhcp server.")),
cfg.IntOpt(
'dnsmasq_lease_max',
"to the network and not through this parameter. ")),
cfg.BoolOpt('enable_metadata_proxy', default=True,
help=_("Allow running metadata proxy.")),
- cfg.BoolOpt('router_delete_namespaces', default=False,
+ cfg.BoolOpt('router_delete_namespaces', default=True,
help=_("Delete namespace after removing a router.")),
cfg.StrOpt('metadata_access_mark',
default='0x1',
'OVSInterfaceDriver'),
'ovs_integration_bridge': integration_bridge,
'external_network_bridge': self._generate_external_bridge(),
- 'router_delete_namespaces': 'True',
'debug': 'True',
'verbose': 'True',
}
conf.set_override(
'interface_driver',
'neutron.agent.linux.interface.OVSInterfaceDriver')
- conf.set_override('router_delete_namespaces', True)
br_int = self.useFixture(net_helpers.OVSBridgeFixture()).bridge
br_ex = self.useFixture(net_helpers.OVSBridgeFixture()).bridge
self.mock_ip.del_veth.assert_called_once_with('rfp-aaaa')
def test_destroy_router_namespace_skips_ns_removal(self):
+ self.conf.set_override('router_delete_namespaces', False)
agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
ns = namespaces.Namespace(
'qrouter-bar', self.conf, agent.driver, agent.use_ipv6)
self.assertEqual(self.mock_ip.netns.delete.call_count, 0)
def test_destroy_router_namespace_removes_ns(self):
- self.conf.set_override('router_delete_namespaces', True)
agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
ns = namespaces.Namespace(
'qrouter-bar', self.conf, agent.driver, agent.use_ipv6)
other_namespaces,
mock_snat_ns,
mock_router_ns):
- self.conf.set_override('router_delete_namespaces', True)
good_namespace_list = [namespaces.NS_PREFIX + r['id']
for r in router_list]
def _test_external_gateway_removed_ext_gw_port_and_fip(self, fip_ns=False):
self.conf.set_override('state_path', '/tmp')
- self.conf.set_override('router_delete_namespaces', True)
agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
agent.conf.agent_mode = 'dvr_snat'
self._assert_disabled(lp)
def test_disable(self):
+ self.conf.set_override('dhcp_delete_namespaces', False)
attrs_to_mock = dict([(a, mock.DEFAULT) for a in
['active', 'interface_name']])
network = FakeDualNetwork()
self.assertEqual(ip.return_value.netns.delete.call_count, 0)
def test_disable_delete_ns(self):
- self.conf.set_override('dhcp_delete_namespaces', True)
attrs_to_mock = {'active': mock.DEFAULT}
with mock.patch.multiple(LocalChild, **attrs_to_mock) as mocks: