diff --git a/doc/source/admin/archives/config-plugins.rst b/doc/source/admin/archives/config-plugins.rst index c37e7b31433..515c825bf5a 100644 --- a/doc/source/admin/archives/config-plugins.rst +++ b/doc/source/admin/archives/config-plugins.rst @@ -112,7 +112,6 @@ formerly known as Nicira NVP. core_plugin = vmware rabbit_host = 192.168.203.10 - allow_overlapping_ips = True #. To configure the NSX-mh controller cluster for OpenStack Networking, locate the ``[default]`` section in the diff --git a/doc/source/admin/config-dhcp-ha.rst b/doc/source/admin/config-dhcp-ha.rst index 777dcc49054..82780551b79 100644 --- a/doc/source/admin/config-dhcp-ha.rst +++ b/doc/source/admin/config-dhcp-ha.rst @@ -94,7 +94,6 @@ Configuration [DEFAULT] core_plugin = linuxbridge rabbit_host = controlnode - allow_overlapping_ips = True host = controlnode agent_down_time = 5 dhcp_agents_per_network = 1 diff --git a/doc/source/admin/config-dvr-ha-snat.rst b/doc/source/admin/config-dvr-ha-snat.rst index 96e87293345..3a9cb798709 100644 --- a/doc/source/admin/config-dvr-ha-snat.rst +++ b/doc/source/admin/config-dvr-ha-snat.rst @@ -49,7 +49,6 @@ Controller node configuration [DEFAULT] core_plugin = ml2 service_plugins = router - allow_overlapping_ips = True router_distributed = True l3_ha = True l3_ha_net_cidr = 169.254.192.0/18 diff --git a/doc/source/admin/deploy-lb-selfservice.rst b/doc/source/admin/deploy-lb-selfservice.rst index 4a3bf0b1c22..4e4c14f989a 100644 --- a/doc/source/admin/deploy-lb-selfservice.rst +++ b/doc/source/admin/deploy-lb-selfservice.rst @@ -67,7 +67,6 @@ Controller node [DEFAULT] service_plugins = router - allow_overlapping_ips = True #. In the ``ml2_conf.ini`` file: diff --git a/doc/source/admin/deploy-ovs-selfservice.rst b/doc/source/admin/deploy-ovs-selfservice.rst index 0f6ad59fe38..6ae4cb8eed1 100644 --- a/doc/source/admin/deploy-ovs-selfservice.rst +++ b/doc/source/admin/deploy-ovs-selfservice.rst @@ -61,7 +61,6 @@ Controller node [DEFAULT] service_plugins = router - allow_overlapping_ips = True #. In the ``ml2_conf.ini`` file: diff --git a/doc/source/install/controller-install-option2-obs.rst b/doc/source/install/controller-install-option2-obs.rst index 340badf65bc..c2287800a3d 100644 --- a/doc/source/install/controller-install-option2-obs.rst +++ b/doc/source/install/controller-install-option2-obs.rst @@ -55,7 +55,6 @@ Configure the server component # ... core_plugin = ml2 service_plugins = router - allow_overlapping_ips = true .. end diff --git a/doc/source/install/controller-install-option2-rdo.rst b/doc/source/install/controller-install-option2-rdo.rst index d4550d3f432..46a6022c0bf 100644 --- a/doc/source/install/controller-install-option2-rdo.rst +++ b/doc/source/install/controller-install-option2-rdo.rst @@ -53,7 +53,6 @@ Configure the server component # ... core_plugin = ml2 service_plugins = router - allow_overlapping_ips = true .. end diff --git a/doc/source/install/controller-install-option2-ubuntu.rst b/doc/source/install/controller-install-option2-ubuntu.rst index da6a8c37c9f..d665fc9e501 100644 --- a/doc/source/install/controller-install-option2-ubuntu.rst +++ b/doc/source/install/controller-install-option2-ubuntu.rst @@ -54,7 +54,6 @@ Configure the server component # ... core_plugin = ml2 service_plugins = router - allow_overlapping_ips = true .. end diff --git a/neutron/conf/common.py b/neutron/conf/common.py index aa95f46d374..aa0f4c2018b 100644 --- a/neutron/conf/common.py +++ b/neutron/conf/common.py @@ -86,13 +86,6 @@ core_opts = [ cfg.BoolOpt('dhcp_agent_notification', default=True, help=_("Allow sending resource operation" " notification to DHCP agent")), - cfg.BoolOpt('allow_overlapping_ips', default=True, - deprecated_for_removal=True, - deprecated_since='Yoga', - help=_("Allow overlapping IP support in Neutron. " - "Attention: the following parameter MUST be set to " - "False if Neutron is being used in conjunction with " - "Nova security groups.")), cfg.HostAddressOpt('host', default=net.get_hostname(), sample_default='example.domain', help=_("Hostname to be used by the Neutron server, " diff --git a/neutron/db/ipam_backend_mixin.py b/neutron/db/ipam_backend_mixin.py index 088bd650b25..0ca2d40c433 100644 --- a/neutron/db/ipam_backend_mixin.py +++ b/neutron/db/ipam_backend_mixin.py @@ -28,7 +28,6 @@ from neutron_lib.db import utils as db_utils from neutron_lib import exceptions as exc from neutron_lib.exceptions import address_scope as addr_scope_exc from neutron_lib.utils import net as net_utils -from oslo_config import cfg from oslo_log import log as logging from sqlalchemy.orm import exc as orm_exc @@ -238,11 +237,7 @@ class IpamBackendMixin(db_base_plugin_common.DbBasePluginCommon): if cidr.prefixlen == 0: err_msg = _("0 is not allowed as CIDR prefix length") raise exc.InvalidInput(error_message=err_msg) - if cfg.CONF.allow_overlapping_ips: - subnet_list = [{'id': s.id, 'cidr': s.cidr} - for s in network.subnets] - else: - subnet_list = subnet_obj.Subnet.get_subnet_cidrs(context) + subnet_list = [{'id': s.id, 'cidr': s.cidr} for s in network.subnets] for subnet in subnet_list: if ((netaddr.IPSet([subnet['cidr']]) & new_subnet_ipset) and str(subnet['cidr']) != const.PROVISIONAL_IPV6_PD_PREFIX): diff --git a/neutron/tests/unit/db/test_db_base_plugin_v2.py b/neutron/tests/unit/db/test_db_base_plugin_v2.py index 488baeeb2ed..ee7a6f845e8 100644 --- a/neutron/tests/unit/db/test_db_base_plugin_v2.py +++ b/neutron/tests/unit/db/test_db_base_plugin_v2.py @@ -3487,17 +3487,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase): with self.subnet(cidr=cidr_1), self.subnet(cidr=cidr_2): pass - def test_create_2_subnets_overlapping_cidr_not_allowed_returns_400(self): - cidr_1 = '10.0.0.0/23' - cidr_2 = '10.0.0.0/24' - cfg.CONF.set_override('allow_overlapping_ips', False) - with testlib_api.ExpectedException( - webob.exc.HTTPClientError) as ctx_manager: - with self.subnet(cidr=cidr_1), self.subnet(cidr=cidr_2): - pass - self.assertEqual(webob.exc.HTTPClientError.code, - ctx_manager.exception.code) - def test_create_subnets_bulk_native(self): if self._skip_native_bulk: self.skipTest("Plugin does not support native bulk subnet create") diff --git a/releasenotes/notes/Remove-deprecated-option-allow_overlapping_ips-49a93f56d51d6427.yaml b/releasenotes/notes/Remove-deprecated-option-allow_overlapping_ips-49a93f56d51d6427.yaml new file mode 100644 index 00000000000..12bedf64f5a --- /dev/null +++ b/releasenotes/notes/Remove-deprecated-option-allow_overlapping_ips-49a93f56d51d6427.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Previously deprecated configuration option ``allow_overlapping_ips`` is now + removed.