Comment 17 for bug 1939726

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/812337
Committed: https://opendev.org/openstack/neutron/commit/ba80c87ceed0c7b5ab3f10d509f542f99d4e1a15
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit ba80c87ceed0c7b5ab3f10d509f542f99d4e1a15
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
    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.

    Closes-Bug: #1939726

    Conflicts:
        neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py

    Change-Id: I09cc14dff6933aae63cbd43a29f9221f405ecede
    (cherry picked from commit 5e32dddc11c6ec73afc83d2bfc7c4beaa252de0c)
    (cherry picked from commit fe9e596d3e8c28801093adfd6fb50d6f8786142d)