neutron/neutron/db
Maciej Józefczyk ab32d7ae64 [OVN] Allow IP allocation with different segments for OVN service ports
OVN creates localport [1] for each network that has metadata
and allocate IP address from subnet within this network that has
DHCP enabled. The traffic from this port will never go outside
the chassis.

While using multiple segments with subnet linked to each segment
OVN needs to create an allocation of IP address for each of those
subnets [2] in order to generate data for OVN NBDB IPv4 DHCP Options.

The change [3] started to validate that condition, while multiple
IP addresses from different segments are tried to be allocated on
one port. We can skip this for OVN Metadata port, because there
is no reason to prevent those kind of allocation for OVN.

For stable branches we decide if a port is distributed or not
by looking for DEVICE_OWNER_DHCP device owner  and `ovn` device_id,
instead DEVICE_OWNER_DISTRIBUTED device owner.

Conflicts:
   neutron/db/ipam_backend_mixin.py
   neutron/tests/unit/db/test_ipam_pluggable_backend.py

[1] http://www.openvswitch.org/support/dist-docs/ovn-architecture.7.html
[2] 5f42488a9a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py (L2279)
[3] https://review.opendev.org/#/c/709444/

Change-Id: Ib51cde89ed873f48db4daebc27a0980da9cc0f19
Closes-Bug: 1871608
(cherry picked from commit 8d1512afb0)
2020-07-27 11:49:18 +00:00
..
allowed_address_pairs Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
availability_zone remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
extra_dhcp_opt Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
metering Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
migration Add Rocky milestone tag for alembic migration revisions 2020-05-14 03:38:18 +00:00
models Allow sharing of address scopes via RBAC mechanism 2020-03-19 16:51:39 +02:00
network_dhcp_agent_binding Move migration to proper dir and fix objects tests 2019-11-04 17:44:44 +00:00
port_security Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
qos Refactor qos_plugin._extend_port_resource_request 2019-07-05 08:10:01 +00:00
quota Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
_utils.py Switch DB _utils to new engine facade 2019-05-28 18:35:13 -05:00
address_scope_db.py Allow sharing of address scopes via RBAC mechanism 2020-03-19 16:51:39 +02:00
agents_db.py Add default value to agent create_or_update_agent new param 2019-06-25 14:13:10 +00:00
agentschedulers_db.py Dont schedule Network, respecting network_auto_schedule config 2019-11-26 01:55:03 +00:00
allowedaddresspairs_db.py use AuthenticIPNetwork and AuthenticEUI from neutron-lib 2019-06-25 08:47:48 -06:00
data_plane_status_db.py Fix pep8 E128 warnings in non-test code 2019-03-12 21:22:33 +00:00
db_base_plugin_common.py Allow sharing of subnet pools via RBAC mechanism 2020-04-09 19:02:47 +03:00
db_base_plugin_v2.py Auto-delete dhcp ports on segment delete 2020-07-13 12:40:18 +02:00
dns_db.py Fix pep8 E128 warnings in non-test code 2019-03-12 21:22:33 +00:00
dvr_mac_db.py Optimize DVR related port DB query 2019-08-25 01:24:03 +08:00
external_net_db.py Remove leftovers of get_external_network_id for router 2020-02-28 10:53:29 +00:00
extradhcpopt_db.py Utilize bulk port creation ops in ml2 plugin 2019-03-21 11:31:36 +00:00
extraroute_db.py Implement extension: extraroute-atomic 2019-09-11 13:58:47 +02:00
flavors_db.py delete common_db_mixin 2019-04-17 11:25:41 -06:00
ipam_backend_mixin.py [OVN] Allow IP allocation with different segments for OVN service ports 2020-07-27 11:49:18 +00:00
ipam_pluggable_backend.py [OVN] Allow IP allocation with different segments for OVN service ports 2020-07-27 11:49:18 +00:00
l3_agentschedulers_db.py L3 agent scheduler should return a valid index if manual scheduling 2020-06-26 09:59:27 +00:00
l3_attrs_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_db.py Remove Floating IP DNS record upon associated port deletion 2019-10-28 09:26:20 +00:00
l3_dvr_db.py [DVR] Don't populate unbound ports in router's ARP cache 2020-03-31 19:33:44 +02:00
l3_dvr_ha_scheduler_db.py Fix connection between 2 dvr routers 2018-11-01 18:01:25 +01:00
l3_dvrscheduler_db.py [DVR] Related routers should be included if are requested 2020-07-10 13:29:52 +00:00
l3_fip_pools_db.py Introduce floating IP pool resource 2018-10-04 15:53:53 +00:00
l3_fip_port_details.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_fip_qos.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_gateway_ip_qos.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_gwmode_db.py Fix pep8 E128 warnings in non-test code 2019-03-12 21:22:33 +00:00
l3_hamode_db.py Switch to new engine facade for L3_HA_NAT_db_mixin 2019-06-05 11:39:44 +00:00
l3_hascheduler_db.py Merge "Fix _notify_l3_agent_port_update when there is no binding host" 2020-03-15 03:13:52 +00:00
models_v2.py Lock subnets during port creation and subnet deletion 2020-04-23 16:43:19 +00:00
network_ip_availability_db.py use context manager from neutron-lib 2018-10-24 07:18:46 -06:00
ovn_hash_ring_db.py [OVN] Add hash ring methods 2019-12-03 08:53:45 +00:00
ovn_revision_numbers_db.py [OVN] Import OVN Client, L3 and QoS related code 2019-12-14 19:17:40 +00:00
portbindings_base.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
portbindings_db.py remove the neutron.db._model_query module 2019-01-25 08:55:25 -07:00
portsecurity_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
portsecurity_db_common.py Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
provisioning_blocks.py use callback payloads for PROVISIONING_COMPLETE 2019-07-31 09:18:14 -06:00
rbac_db_mixin.py rbac: Catch correct exception for duplicated entry 2019-06-06 19:23:17 +00:00
rbac_db_models.py Allow sharing of subnet pools via RBAC mechanism 2020-04-09 19:02:47 +03:00
securitygroups_db.py Make _ensure_default_security_group method atomic 2020-06-24 07:51:29 +00:00
securitygroups_rpc_base.py [Security] fix allowed-address-pair 0.0.0.0/0 issue 2020-03-21 17:54:34 +08:00
segments_db.py Change provider network segmentation ID 2019-04-01 12:55:50 +00:00
servicetype_db.py Switch to new engine facade for ExtraRoute_dbonly_mixin 2019-06-28 10:30:56 +00:00
standard_attr.py shim standard_attr db for neutron-lib 2019-07-23 14:17:29 -06:00
standardattrdescription_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
subnet_service_type_mixin.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
uplink_status_propagation_db.py Fix pep8 E128 warnings in non-test code 2019-03-12 21:22:33 +00:00
vlantransparent_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00