yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #89565
[Bug 1739798] Re: update_network_postcommit is being called from delete_network_precommit with an open session
Reviewed: https://review.opendev.org/c/openstack/neutron/+/852885
Committed: https://opendev.org/openstack/neutron/commit/3202a5c19ec01dfd38c4471be21002467bc0a0e5
Submitter: "Zuul (22348)"
Branch: master
commit 3202a5c19ec01dfd38c4471be21002467bc0a0e5
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date: Wed Aug 10 12:02:50 2022 +0200
[OVN] Remove session check in ``update_network_postcommit``
Since [1], when a segment is deleted because the network is before,
the segment event handler method ``_handle_segment_change`` does not
call ``_notify_mechanism_driver_for_segment_change`` and thus the
check performed in ``OVNMechanismDriver.update_network_postcommit``
is not needed anymore.
[1]https://review.opendev.org/c/openstack/neutron/+/786373
Closes-Bug: #1739798
Change-Id: I4bb22a0a0a233609a4d23af55a050356049eb214
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1739798
Title:
update_network_postcommit is being called from
delete_network_precommit with an open session
Status in neutron:
Fix Released
Bug description:
When a network is deleted, its segments are also deleted [0]. For each
segment, it will notify about resources.SEGMENT and
events.AFTER_DELETE [1] which will turn out in calling
update_network_postcommit [2].
This should be avoided since drivers expect their postcommit methods
to be called with no open sessions to the database. There should be
separate callbacks for segments so that there's no transactions opened
to the database in any of the postcommit calls.
We detected this in networking-ovn driver because we're attempting to
bump revision numbers in a separate table in Neutron database when a
network is updated but we can't commit that change to the database
because there's already an open session on a network delete operation.
This may be affecting other drivers as well.
[0] https://github.com/openstack/neutron/blob/6cdd079f8f3e6994734fa806b3c819cecb5f521a/neutron/services/segments/db.py#L315
[1] https://github.com/openstack/neutron/blob/6cdd079f8f3e6994734fa806b3c819cecb5f521a/neutron/services/segments/db.py#L178
[2] https://github.com/openstack/neutron/blob/6cdd079f8f3e6994734fa806b3c819cecb5f521a/neutron/plugins/ml2/plugin.py#L1917
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1739798/+subscriptions
References