Bug 1824799 - [OVN][QOS] NBDB qos table entries still exist even after corresponding neutron ports are deleted
Summary: [OVN][QOS] NBDB qos table entries still exist even after corresponding neutro...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-networking-ovn
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z2
: 16.1 (Train on RHEL 8.2)
Assignee: Assaf Muller
QA Contact: Eran Kuris
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-16 13:13 UTC by Roman Safronov
Modified: 2020-10-28 15:37 UTC (History)
6 users (show)

Fixed In Version: python-networking-ovn-7.2.1-0.20200725153358.cb24eb9.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-28 15:36:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1886962 0 None None None 2020-07-09 13:59:55 UTC
OpenStack gerrit 711317 0 None MERGED Refactor OVN client QoS extension 2021-02-09 11:11:21 UTC
OpenStack gerrit 740967 0 None MERGED [OVN] Fix logic issue while deleting port with QoS 2021-02-09 11:11:21 UTC
Red Hat Product Errata RHEA-2020:4284 0 None None None 2020-10-28 15:37:17 UTC

Description Roman Safronov 2020-04-16 13:13:13 UTC
Description of problem:
When removing neutron ports with qos policy applied, corresponding entries are not removed from NBDB qos table. 

Version-Release number of selected component (if applicable):
16.0-RHEL-8/RHOS_TRUNK-16.0-RHEL-8-20200406.n.1
python3-networking-ovn-7.1.1-0.20200403214619.4114bc5.el8ost.noarch

How reproducible:
100%

Steps to Reproduce:
openstack network qos policy create bw-limiter
openstack network qos rule create --type bandwidth-limit --max-kbps 3000     --max-burst-kbits 2400 --egress bw-limiter
openstack network create internal_A
openstack port create vm1-port --network internal_A
openstack port set --qos-policy bw-limiter <PORT ID>
On this stage 'ovn-nbctl list qos' displays corresponding qos rule of the port
openstack port delete <PORT ID>
Result: port removed from neutron DB - this is OK. But OVN NBDB qos table still displays qos entry for this port:
_uuid               : abda7463-85f3-43ad-a7b5-0832ac80fb9b
action              : {}
bandwidth           : {burst=2400, rate=3000}
direction           : from-lport
external_ids        : {}
match               : "inport == \"7adca6f0-e44a-4233-ba49-686c533cebe8\""
priority            : 2002


Actual results:
qos entries of deleted neutron ports still exist in NBDB

Expected results:
qos entries of deleted neutron ports not exist in NBDB

Additional info:

Comment 2 Roman Safronov 2020-04-19 09:35:00 UTC
Note: specified scenario is not fully correct, I noticed that port update is not creating a qos entry in NBDB, see https://bugzilla.redhat.com/show_bug.cgi?id=1825599

Use the following scenario to reproduce (note, create port with qos policy not update port with qos policy)

openstack network qos policy create bw-limiter
openstack network qos rule create --type bandwidth-limit --max-kbps 3000     --max-burst-kbits 2400 --egress bw-limiter
openstack network create internal_A
openstack port create vm1-port --network internal_A --qos-policy bw-limiter 

On this stage 'ovn-nbctl list qos' displays corresponding qos rule of the port
openstack port delete <PORT ID>

Comment 7 Roman Safronov 2020-07-01 08:37:32 UTC
Tried to verify on  RHOS-16.1-RHEL-8-20200625.n.0    with python3-networking-ovn-7.2.1-0.20200611111150.18fabca.el8ost.noarch
The issue reproduced in both scenarios (see steps from the description and comment2)

commands that I ran:

openstack network qos policy create bw-limiter
openstack network qos rule create --type bandwidth-limit --max-kbps 3000     --max-burst-kbits 2400 --egress bw-limiter
openstack network create internal_A
openstack port create vm1-port --network internal_A
openstack port set --qos-policy bw-limiter 5bf5d7e5-a3c1-41c0-b5fd-495d92e65809
openstack port delete 5bf5d7e5-a3c1-41c0-b5fd-495d92e65809

openstack network qos policy create bw-limiter2
openstack network qos rule create --type bandwidth-limit --max-kbps 3001     --max-burst-kbits 2401 --egress bw-limiter2
openstack network create internal_B
openstack port create vm1-port --network internal_B --qos-policy bw-limiter2
openstack port delete 67d311ee-4860-4594-bdf2-f57123d1626b


QoS NBDB contents after I removed neutron ports 5bf5d7e5-a3c1-41c0-b5fd-495d92e65809 and 67d311ee-4860-4594-bdf2-f57123d1626b

[heat-admin@controller-0 ~]$ ovn-nbctl list qos
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
_uuid               : 9b1e5e52-61b8-42e6-9439-cbcf2d71689b
action              : {}
bandwidth           : {burst=2400, rate=3000}
direction           : from-lport
external_ids        : {}
match               : "inport == \"5bf5d7e5-a3c1-41c0-b5fd-495d92e65809\""
priority            : 2002

_uuid               : 650796c6-689e-47e3-8d08-aef88e115d1b
action              : {}
bandwidth           : {burst=2401, rate=3001}
direction           : from-lport
external_ids        : {}
match               : "inport == \"67d311ee-4860-4594-bdf2-f57123d1626b\""
priority            : 2002

Comment 10 spower 2020-07-27 10:24:58 UTC
Removing z1 flag as this bug does not have approval, please follow the usual blocker process to have this included in z1, ideally add the z2 TM flag if it can wait. If it gets approved as a blocker for 16.1.1 then it will have to be in Modified by July 29th to be included.

Comment 18 Roman Safronov 2020-10-27 12:57:06 UTC
Verified on RHOS-16.1-RHEL-8-20201021.n.0 with python3-networking-ovn-7.3.1-1.20200902233412.4e24f4c.1.el8ost.noarch
Verified according to the comment 7 above.
After deleting neutron ports the NBDB qos table entries were deleted as well - as expected.

Comment 22 errata-xmlrpc 2020-10-28 15:36:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4284


Note You need to log in before you can comment on or make changes to this bug.