Remove "allow_overlapping_ips" config option
It was deprecated in Yoga by patch [1]. Now it's time to remove it. [1] https://review.opendev.org/c/openstack/neutron/+/807848 Closes-Bug: #1942294 Change-Id: I95555395c8adcec70459d5f438e1080da358c4d4
This commit is contained in:
parent
4f9313fca1
commit
fde91e8059
doc/source
admin
install
neutron
releasenotes/notes
@ -112,7 +112,6 @@ formerly known as Nicira NVP.
|
|||||||
|
|
||||||
core_plugin = vmware
|
core_plugin = vmware
|
||||||
rabbit_host = 192.168.203.10
|
rabbit_host = 192.168.203.10
|
||||||
allow_overlapping_ips = True
|
|
||||||
|
|
||||||
#. To configure the NSX-mh controller cluster for OpenStack Networking,
|
#. To configure the NSX-mh controller cluster for OpenStack Networking,
|
||||||
locate the ``[default]`` section in the
|
locate the ``[default]`` section in the
|
||||||
|
@ -94,7 +94,6 @@ Configuration
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
core_plugin = linuxbridge
|
core_plugin = linuxbridge
|
||||||
rabbit_host = controlnode
|
rabbit_host = controlnode
|
||||||
allow_overlapping_ips = True
|
|
||||||
host = controlnode
|
host = controlnode
|
||||||
agent_down_time = 5
|
agent_down_time = 5
|
||||||
dhcp_agents_per_network = 1
|
dhcp_agents_per_network = 1
|
||||||
|
@ -49,7 +49,6 @@ Controller node configuration
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
core_plugin = ml2
|
core_plugin = ml2
|
||||||
service_plugins = router
|
service_plugins = router
|
||||||
allow_overlapping_ips = True
|
|
||||||
router_distributed = True
|
router_distributed = True
|
||||||
l3_ha = True
|
l3_ha = True
|
||||||
l3_ha_net_cidr = 169.254.192.0/18
|
l3_ha_net_cidr = 169.254.192.0/18
|
||||||
|
@ -67,7 +67,6 @@ Controller node
|
|||||||
|
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
service_plugins = router
|
service_plugins = router
|
||||||
allow_overlapping_ips = True
|
|
||||||
|
|
||||||
#. In the ``ml2_conf.ini`` file:
|
#. In the ``ml2_conf.ini`` file:
|
||||||
|
|
||||||
|
@ -61,7 +61,6 @@ Controller node
|
|||||||
|
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
service_plugins = router
|
service_plugins = router
|
||||||
allow_overlapping_ips = True
|
|
||||||
|
|
||||||
#. In the ``ml2_conf.ini`` file:
|
#. In the ``ml2_conf.ini`` file:
|
||||||
|
|
||||||
|
@ -55,7 +55,6 @@ Configure the server component
|
|||||||
# ...
|
# ...
|
||||||
core_plugin = ml2
|
core_plugin = ml2
|
||||||
service_plugins = router
|
service_plugins = router
|
||||||
allow_overlapping_ips = true
|
|
||||||
|
|
||||||
.. end
|
.. end
|
||||||
|
|
||||||
|
@ -53,7 +53,6 @@ Configure the server component
|
|||||||
# ...
|
# ...
|
||||||
core_plugin = ml2
|
core_plugin = ml2
|
||||||
service_plugins = router
|
service_plugins = router
|
||||||
allow_overlapping_ips = true
|
|
||||||
|
|
||||||
.. end
|
.. end
|
||||||
|
|
||||||
|
@ -54,7 +54,6 @@ Configure the server component
|
|||||||
# ...
|
# ...
|
||||||
core_plugin = ml2
|
core_plugin = ml2
|
||||||
service_plugins = router
|
service_plugins = router
|
||||||
allow_overlapping_ips = true
|
|
||||||
|
|
||||||
.. end
|
.. end
|
||||||
|
|
||||||
|
@ -86,13 +86,6 @@ core_opts = [
|
|||||||
cfg.BoolOpt('dhcp_agent_notification', default=True,
|
cfg.BoolOpt('dhcp_agent_notification', default=True,
|
||||||
help=_("Allow sending resource operation"
|
help=_("Allow sending resource operation"
|
||||||
" notification to DHCP agent")),
|
" 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(),
|
cfg.HostAddressOpt('host', default=net.get_hostname(),
|
||||||
sample_default='example.domain',
|
sample_default='example.domain',
|
||||||
help=_("Hostname to be used by the Neutron server, "
|
help=_("Hostname to be used by the Neutron server, "
|
||||||
|
@ -28,7 +28,6 @@ from neutron_lib.db import utils as db_utils
|
|||||||
from neutron_lib import exceptions as exc
|
from neutron_lib import exceptions as exc
|
||||||
from neutron_lib.exceptions import address_scope as addr_scope_exc
|
from neutron_lib.exceptions import address_scope as addr_scope_exc
|
||||||
from neutron_lib.utils import net as net_utils
|
from neutron_lib.utils import net as net_utils
|
||||||
from oslo_config import cfg
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from sqlalchemy.orm import exc as orm_exc
|
from sqlalchemy.orm import exc as orm_exc
|
||||||
|
|
||||||
@ -238,11 +237,7 @@ class IpamBackendMixin(db_base_plugin_common.DbBasePluginCommon):
|
|||||||
if cidr.prefixlen == 0:
|
if cidr.prefixlen == 0:
|
||||||
err_msg = _("0 is not allowed as CIDR prefix length")
|
err_msg = _("0 is not allowed as CIDR prefix length")
|
||||||
raise exc.InvalidInput(error_message=err_msg)
|
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]
|
||||||
subnet_list = [{'id': s.id, 'cidr': s.cidr}
|
|
||||||
for s in network.subnets]
|
|
||||||
else:
|
|
||||||
subnet_list = subnet_obj.Subnet.get_subnet_cidrs(context)
|
|
||||||
for subnet in subnet_list:
|
for subnet in subnet_list:
|
||||||
if ((netaddr.IPSet([subnet['cidr']]) & new_subnet_ipset) and
|
if ((netaddr.IPSet([subnet['cidr']]) & new_subnet_ipset) and
|
||||||
str(subnet['cidr']) != const.PROVISIONAL_IPV6_PD_PREFIX):
|
str(subnet['cidr']) != const.PROVISIONAL_IPV6_PD_PREFIX):
|
||||||
|
@ -3487,17 +3487,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
|
|||||||
with self.subnet(cidr=cidr_1), self.subnet(cidr=cidr_2):
|
with self.subnet(cidr=cidr_1), self.subnet(cidr=cidr_2):
|
||||||
pass
|
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):
|
def test_create_subnets_bulk_native(self):
|
||||||
if self._skip_native_bulk:
|
if self._skip_native_bulk:
|
||||||
self.skipTest("Plugin does not support native bulk subnet create")
|
self.skipTest("Plugin does not support native bulk subnet create")
|
||||||
|
5
releasenotes/notes/Remove-deprecated-option-allow_overlapping_ips-49a93f56d51d6427.yaml
Normal file
5
releasenotes/notes/Remove-deprecated-option-allow_overlapping_ips-49a93f56d51d6427.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Previously deprecated configuration option ``allow_overlapping_ips`` is now
|
||||||
|
removed.
|
Loading…
x
Reference in New Issue
Block a user