[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.
Reviewed: https:/ /review. opendev. org/742872 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=8f1912a1d19 5dc69eed9d9aa8f f8c4ef12448b75
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 8f1912a1d195dc6 9eed9d9aa8ff8c4 ef12448b75
Author: Maciej Józefczyk <email address hidden>
Date: Thu Apr 16 12:58:15 2020 +0000
[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 OWNER_DISTRIBUT ED device owner.
by looking for DEVICE_OWNER_DHCP device owner and `ovn` device_id,
instead DEVICE_
Conflicts:
neutron/ db/ipam_ backend_ mixin.py
neutron/ tests/unit/ db/test_ ipam_pluggable_ backend. py
neutron/ tests/unit/ plugins/ ml2/drivers/ ovn/mech_ driver/ test_mech_ driver. py
[1] http:// www.openvswitch .org/support/ dist-docs/ ovn-architectur e.7.html /github. com/openstack/ neutron/ blob/5f42488a9a 6a7a3afa55a56f5 3e2f5ef09365115 /neutron/ plugins/ ml2/drivers/ ovn/mech_ driver/ ovsdb/ovn_ client. py#L2279 /review. opendev. org/#/c/ 709444/
[2] https:/
[3] https:/
Change-Id: Ib51cde89ed873f 48db4daebc27a09 80da9cc0f19 7958c44f2e7f5d4 7865c8a475)
Closes-Bug: 1871608
(cherry picked from commit 8d1512afb07a9a7