[OVN][OVN-BGP-AGENT] Expose port hosting information for virtual ports

Bug #2020058 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
In Progress
Medium
Lucas Alvares Gomes

Bug Description

The NB BGP driver for the ovn-bgp-agent project [0] is a driver that only connects to the OVN Northbound database and get hosting information for ports using the "requested-chassis" option that is set by Neutron.

For virtual ports, this is not populated upon the port creation because the virtual ports are bound by ovn-controller when an ARP packet with the VIP is seeing in the br-int bridge. Upon seeing the ARP ovn-controller will create a Port_Binding entry in the SB DB which will be seeing by Neutron that will call the set_port_stauts_up() etc..., but, the "requested-chassis" does not get populated at that point either because it's only done during port creation or update. It may be later populated by the maintenance task if the Neutron port gets out of sync tho.

We have two problems here:

1. First is that "requested-chassis" should not be populated by Neutron if the port is of type "virtual" because it will be ignored.

2. If not populating it in the "requested-chassis" the NB BGP driver does not have any means to get the hosting information for that port.

This LP would suggest that we stop populating the "requested-chassis" options if the port is virtual and instead add the hosting chassis information to the LSP external_ids in case of the virtual ports.

[0] https://docs.openstack.org/ovn-bgp-agent/latest/contributor/bgp_supportability_matrix.html#bgp-driver-nb

Changed in neutron:
importance: Undecided → Medium
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
status: New → Confirmed
Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Brian Haley (brian-haley) wrote :

https://review.opendev.org/c/openstack/neutron/+/889073

I don't know why this isn't automatically added sometimes.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 20.4.0

This issue was fixed in the openstack/neutron 20.4.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/889073
Committed: https://opendev.org/openstack/neutron/commit/3044b938b9fa7dfef126db9acc18782978238dc6
Submitter: "Zuul (22348)"
Branch: master

commit 3044b938b9fa7dfef126db9acc18782978238dc6
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Jul 20 10:25:23 2023 +0100

    [OVN] Retry retrieving LSP hosting information

    There's a sync issue while trying to fetch the hosting information for
    the LSP before we write it to the OVN database, sometimes the
    information is not yet present and we end up with an empty string ("")
    for the host attribute of portbindings. This patch adds a retry
    mechanism to solve this sync issue.

    Change-Id: I52ec4b346271889ebaa7b7f84981eae5503d02d3
    Related-Bug: #2020058
    Signed-off-by: Lucas Alvares Gomes <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/2023.1)

Related fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/neutron/+/891293

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/zed)

Related fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/neutron/+/891294

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/yoga)

Related fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/neutron/+/891295

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/xena)

Related fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/neutron/+/891296

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/wallaby)

Related fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/neutron/+/891297

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/891293
Committed: https://opendev.org/openstack/neutron/commit/ddbb29afa417a0379b9faa07130abddf3e77b3c9
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit ddbb29afa417a0379b9faa07130abddf3e77b3c9
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Jul 20 10:25:23 2023 +0100

    [OVN] Retry retrieving LSP hosting information

    There's a sync issue while trying to fetch the hosting information for
    the LSP before we write it to the OVN database, sometimes the
    information is not yet present and we end up with an empty string ("")
    for the host attribute of portbindings. This patch adds a retry
    mechanism to solve this sync issue.

    Change-Id: I52ec4b346271889ebaa7b7f84981eae5503d02d3
    Related-Bug: #2020058
    Signed-off-by: Lucas Alvares Gomes <email address hidden>
    (cherry picked from commit 3044b938b9fa7dfef126db9acc18782978238dc6)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/891294
Committed: https://opendev.org/openstack/neutron/commit/3729df1181a7d8dc5f866d2fa0c08e75fa22c8da
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 3729df1181a7d8dc5f866d2fa0c08e75fa22c8da
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Jul 20 10:25:23 2023 +0100

    [OVN] Retry retrieving LSP hosting information

    There's a sync issue while trying to fetch the hosting information for
    the LSP before we write it to the OVN database, sometimes the
    information is not yet present and we end up with an empty string ("")
    for the host attribute of portbindings. This patch adds a retry
    mechanism to solve this sync issue.

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

    Change-Id: I52ec4b346271889ebaa7b7f84981eae5503d02d3
    Related-Bug: #2020058
    Signed-off-by: Lucas Alvares Gomes <email address hidden>
    (cherry picked from commit 3044b938b9fa7dfef126db9acc18782978238dc6)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/891295
Committed: https://opendev.org/openstack/neutron/commit/10a981a1589a82f739980807475cea8151fa9a70
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 10a981a1589a82f739980807475cea8151fa9a70
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Jul 20 10:25:23 2023 +0100

    [OVN] Retry retrieving LSP hosting information

    There's a sync issue while trying to fetch the hosting information for
    the LSP before we write it to the OVN database, sometimes the
    information is not yet present and we end up with an empty string ("")
    for the host attribute of portbindings. This patch adds a retry
    mechanism to solve this sync issue.

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

    Change-Id: I52ec4b346271889ebaa7b7f84981eae5503d02d3
    Related-Bug: #2020058
    Signed-off-by: Lucas Alvares Gomes <email address hidden>
    (cherry picked from commit 3044b938b9fa7dfef126db9acc18782978238dc6)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/891296
Committed: https://opendev.org/openstack/neutron/commit/f26a30a03e61c51c0ed1cadba77d0e6a4443b8ae
Submitter: "Zuul (22348)"
Branch: stable/xena

commit f26a30a03e61c51c0ed1cadba77d0e6a4443b8ae
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Jul 20 10:25:23 2023 +0100

    [OVN] Retry retrieving LSP hosting information

    There's a sync issue while trying to fetch the hosting information for
    the LSP before we write it to the OVN database, sometimes the
    information is not yet present and we end up with an empty string ("")
    for the host attribute of portbindings. This patch adds a retry
    mechanism to solve this sync issue.

    Conflicts:
      neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_client.py

    Change-Id: I52ec4b346271889ebaa7b7f84981eae5503d02d3
    Related-Bug: #2020058
    Signed-off-by: Lucas Alvares Gomes <email address hidden>
    (cherry picked from commit 3044b938b9fa7dfef126db9acc18782978238dc6)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/891297
Committed: https://opendev.org/openstack/neutron/commit/cf2508bdb88ed40835637009b5f333a74bdd764d
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit cf2508bdb88ed40835637009b5f333a74bdd764d
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Jul 20 10:25:23 2023 +0100

    [OVN] Retry retrieving LSP hosting information

    There's a sync issue while trying to fetch the hosting information for
    the LSP before we write it to the OVN database, sometimes the
    information is not yet present and we end up with an empty string ("")
    for the host attribute of portbindings. This patch adds a retry
    mechanism to solve this sync issue.

    Conflicts:
      neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_client.py

    Change-Id: I52ec4b346271889ebaa7b7f84981eae5503d02d3
    Related-Bug: #2020058
    Signed-off-by: Lucas Alvares Gomes <email address hidden>
    (cherry picked from commit 3044b938b9fa7dfef126db9acc18782978238dc6)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 23.0.0.0b3

This issue was fixed in the openstack/neutron 23.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 22.1.0

This issue was fixed in the openstack/neutron 22.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 21.2.0

This issue was fixed in the openstack/neutron 21.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron wallaby-eom

This issue was fixed in the openstack/neutron wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron xena-eom

This issue was fixed in the openstack/neutron xena-eom release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.