[OVN] "standard_attr" register missing during inconsistency check

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

Bug Description

During the inconsistency check, performed by a maintenance worker, the "ovn_revision_numbers" register failed because the "standardattributes" register was not present [1].

Snippet:
2022-11-09 05:44:50.755 21 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance oslo_db.exception.DBReferenceError: (pymysql.err.IntegrityError) (1452, 'Cannot add or update a child row: a foreign key constraint fails (`ovs_neutron`.`ovn_revision_numbers`, CONSTRAINT `ovn_revision_numbers_ibfk_1` FOREIGN KEY (`standard_attr_id`) REFERENCES `standardattributes` (`id`) ON DELETE SET NULL)')
2022-11-09 05:44:50.755 21 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance [SQL: INSERT INTO ovn_revision_numbers (standard_attr_id, resource_uuid, resource_type, revision_number, created_at, updated_at) VALUES (%(standard_attr_id)s, %(resource_uuid)s, %(resource_type)s, %(revision_number)s, now(), now())]
2022-11-09 05:44:50.755 21 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance [parameters: {'standard_attr_id': 20222, 'resource_uuid': 'b21666d4-898a-44cf-bd12-2471b182f3d4', 'resource_type': 'networks', 'revision_number': -1}]

[1]https://paste.opendev.org/show/bAX5MlyJtY60zWujIlGu/

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
importance: Undecided → Medium
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/+/864215

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

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

commit 81004125c4592f2378d8434e41ec2db41a42886b
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Nov 10 16:43:33 2022 +0100

    [OVN] Prevent maintenance task fail resource stdattr does not exist

    In the maintenance task, the method that fixes the missing or not
    updated resources ``DBInconsistenciesPeriodics._fix_create_update``
    not won't exit if the resource is not found in the Neutron database.
    When the OVN revision number is bumped, now the method retrieves the
    resource standard attributes register. If this register does not
    exist, that means the resource has been deleted.

    The method catches the ``StandardAttributeIDNotFound`` exception and
    logs an error.

    Closes-Bug: #1996180
    Change-Id: Ic47c10ea2ba07347f32f75aa5de3c69e9e261780

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 22.0.0.0rc1

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

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.