[OVN] Method ``get_port_qos`` should always return 2 values

Bug #2009804 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rodolfo Alonso

Bug Description

The method ``neutron.agent.ovn.agent.ovsdb.get_port_qos`` should always return 2 values. This is not happening in the (very rare) case of not finding the port logical_switch_port. In this case [1] we are only returning one value (an empty dictionary).

[1]https://github.com/openstack/neutron/blob/50dc9dd24377ddb04bcb7fc9be362894b6ed1490/neutron/agent/ovn/agent/ovsdb.py#L165

Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
tags: added: low-ha
tags: added: low-hanging-fruit ovn
removed: low-ha
Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/876945

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/neutron/+/876947

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

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

commit bffa642b351f7fc3bb5cfb7a1bb2a3499c4b4506
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Mar 8 09:08:33 2023 +0100

    [OVN] Method ``get_port_qos`` should always return 2 values

    The method ``neutron.agent.ovn.agent.ovsdb.get_port_qos`` should
    always return 2 values, even when the LSP is not present. This
    patch:
    * fixes the output, returning 2 values
    * catches the exception raised when the LSP is not present in the
      OVN NB database
    * returns the default max_kbps and min_kbps values (0, 0).

    Closes-Bug: #2009804
    Change-Id: I03ea78fcc5825e35c07dda1aa790769aa918dd8a

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/2023.1)

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

commit b79990c7a2d831fa44afeed9f468d3bfbc478dad
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Mar 8 09:08:33 2023 +0100

    [OVN] Method ``get_port_qos`` should always return 2 values

    The method ``neutron.agent.ovn.agent.ovsdb.get_port_qos`` should
    always return 2 values, even when the LSP is not present. This
    patch:
    * fixes the output, returning 2 values
    * catches the exception raised when the LSP is not present in the
      OVN NB database
    * returns the default max_kbps and min_kbps values (0, 0).

    Closes-Bug: #2009804
    Change-Id: I03ea78fcc5825e35c07dda1aa790769aa918dd8a
    (cherry picked from commit bffa642b351f7fc3bb5cfb7a1bb2a3499c4b4506)

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

This issue was fixed in the openstack/neutron 22.0.0.0rc2 release candidate.

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

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

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.