Comment 33 for bug 1789686

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to networking-ovn (stable/rocky)

Reviewed: https://review.opendev.org/704902
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=32eb8c3f0171c453459cd1a19ae4ed17c0ed962a
Submitter: Zuul
Branch: stable/rocky

commit 32eb8c3f0171c453459cd1a19ae4ed17c0ed962a
Author: Lucas Alvares Gomes <email address hidden>
Date: Wed Aug 7 13:47:55 2019 +0100

    Add support for virtual port type

    This patch adds support for "virtual" port type following the work in
    core OVN [0].

    Currently there are two main usages for this type of port:

    * Octavia: For creating the logical port for the virtual IP.
    * VRRP [1]

    Upon adding an IP address to the allowed_address_pairs field of the
    Neutron's port, networking-ovn will look if that IP matches with the IP
    of another existing port in the same network. If so, networking-ovn will
    updating the matching port accordingly setting its type to "virtual"
    and adding the required options in the OVN database.

    The patch also accounts for other situations such as:

    * Creating the VIP port after the parents (the ones with the IP in the
      allowed_address_pairs field) are created.

    * When updating removing/adding allowed_address_pairs' the virtual
      ports are also updated.

    * When deleting a parent port the virtual ports are also updated.

    The code removes the type "virtual" from a virtual port whenever there's
    no parents left (in case of deletion or editing allowed_address_pairs)
    making it an ordinary port again.

    The patch also keeps the logic introduced by
    33fd553158a96b4dc40c66acf050fa7f91227dec for version of OVN which does
    not support the virtual port type (> 2.12) making it backward compatible.

    [0]
    https://github.com/ovn-org/ovn/commit/054f4c85c413e20d893e10ba053ec52ac15db49c
    [1]
    https://docs.catalystcloud.io/tutorials/deploying-highly-available-instances-with-keepalived.html

    Closes-Bug: #1840449
    Related-Bug: #1789686
    Signed-off-by: Lucas Alvares Gomes <email address hidden>
    (cherry picked from commit 5e72ea104cba1c30d2de36dbbab6e3d23a075929)

    Conflicts:
        networking_ovn/common/ovn_client.py
        networking_ovn/tests/functional/test_mech_driver.py
        networking_ovn/tests/unit/fakes.py
        networking_ovn/tests/unit/ml2/test_mech_driver.py

    Change-Id: I0b01b764413d178759a43028428c212014d3aa80