Bug 2062374 - ml2/ovn maintenance thread unable to handle deleted subnets [NEEDINFO]
Summary: ml2/ovn maintenance thread unable to handle deleted subnets
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
high
high
Target Milestone: z9
: 16.1 (Train on RHEL 8.2)
Assignee: OSP Team
QA Contact: Bharath M V
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-09 16:28 UTC by Terry Wilson
Modified: 2022-12-07 20:26 UTC (History)
9 users (show)

Fixed In Version: python-networking-ovn-7.3.1-1.20220502142031.4e24f4c.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-07 20:25:58 UTC
Target Upstream Version:
Embargoed:
jamsmith: needinfo? (rhos-maint)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1948466 0 None None None 2022-03-09 16:28:19 UTC
Red Hat Issue Tracker OSP-13469 0 None None None 2022-03-09 16:34:00 UTC
Red Hat Product Errata RHBA-2022:8795 0 None None None 2022-12-07 20:26:26 UTC

Description Terry Wilson 2022-03-09 16:28:19 UTC
Description of problem:
As of the fixes for:

https://bugzilla.redhat.com/show_bug.cgi?id=1994591
https://bugzilla.redhat.com/show_bug.cgi?id=2010243

The maintenance thread throws:
ERROR networking_ovn.common.maintenance [req-05ecce78-b0a7-44b8-a4c1-d7dc6d1e0ad4 - - - - -] Maintenance task: Failed to fix deleted resource e55383a3-efb0-4c9c-9ede-3cce5f60a65d (type: subnets): KeyError: 'uuid'
ERROR networking_ovn.common.maintenance Traceback (most recent call last):
ERROR networking_ovn.common.maintenance   File "/usr/lib/python3.6/site-packages/networking_ovn/common/maintenance.py", line 378, in check_for_inconsistencies
ERROR networking_ovn.common.maintenance     self._ovn_client.delete_subnet(row.resource_uuid)
ERROR networking_ovn.common.maintenance   File "/usr/lib/python3.6/site-packages/networking_ovn/common/ovn_client.py", line 2028, in delete_subnet
ERROR networking_ovn.common.maintenance     self._remove_subnet_dhcp_options(subnet_id, txn)
ERROR networking_ovn.common.maintenance   File "/usr/lib/python3.6/site-packages/networking_ovn/common/ovn_client.py", line 1894, in _remove_subnet_dhcp_options
ERROR networking_ovn.common.maintenance     dhcp_options['subnet']['uuid']))
ERROR networking_ovn.common.maintenance KeyError: 'uuid'

This will result in orphaned OVNRevisionNumbers entries in the mysql db, and as time goes on ever more repeated ERROR log messages as the maintenance thread tries and fails to fix deleted subnets without DHCP. Luckily, the fix is a very safe one-line change that is extremely unlikely to have any negative side effects.


Version-Release number of selected component (if applicable):
16.1_20220225.1


How reproducible:
100%

Steps to Reproduce:
1. Create a subnet with --no-dhcp
2. Delete the subnet


Actual results:
ERROR messages in the controller logs repeated every 5 mins by default, subnet entry in ovn_revision_numbers table is deleted

Expected results:
No errors, ovn_revision_numbers entry is deleted


Additional info:
A user could theoretically create and delete an unbounded number of subnets, causing the DB to grow with orphaned entries.

Comment 2 Terry Wilson 2022-03-09 16:31:48 UTC
> Actual results:
> ERROR messages in the controller logs repeated every 5 mins by default, subnet entry in ovn_revision_numbers table is deleted

entry in ovn_revision_numbers table is *not* deleted

Comment 18 errata-xmlrpc 2022-12-07 20:25:58 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.9 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/RHBA-2022:8795


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