When a subnet does not have DHCP configured, the metadata port does
not have an IP address on this CIDR. The method
"OvnNbSynchronizer.sync_networks_ports_and_dhcp_opts", was always
setting an IP address for the metadata ports, regardless of the subnet
configuration (with or without DHCP).
The method "_sync_metadata_ports", in charge of synchronizing the
metadata ports, now filters the subnets by the parameter "enable_dhcp".
In case of having a subnet with DHCP enabled, if the metadata port is
missing the subnet IP addresses, the method adds them.
In case of having a subnet without DHCP enabled, if the metadata port
has an IP address on the subnet, the method removes it.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/812335 /opendev. org/openstack/ neutron/ commit/ fe9e596d3e8c288 01093adfd6fb50d 6f8786142d
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/wallaby
commit fe9e596d3e8c288 01093adfd6fb50d 6f8786142d
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Sep 30 16:28:19 2021 +0000
Fix "_sync_ metadata_ ports" with no DHCP subnets
When a subnet does not have DHCP configured, the metadata port does ronizer. sync_networks_ ports_and_ dhcp_opts" , was always
not have an IP address on this CIDR. The method
"OvnNbSynch
setting an IP address for the metadata ports, regardless of the subnet
configuration (with or without DHCP).
The method "_sync_ metadata_ ports", in charge of synchronizing the
metadata ports, now filters the subnets by the parameter "enable_dhcp".
In case of having a subnet with DHCP enabled, if the metadata port is
missing the subnet IP addresses, the method adds them.
In case of having a subnet without DHCP enabled, if the metadata port
has an IP address on the subnet, the method removes it.
Closes-Bug: #1939726
Conflicts:
neutron/ plugins/ ml2/drivers/ ovn/mech_ driver/ ovsdb/ovn_ client. py
Change-Id: I09cc14dff6933a ae63cbd43a29f92 21f405ecede 3afc83d2bfc7c4b eaa252de0c)
(cherry picked from commit 5e32dddc11c6ec7