update_network_postcommit is being called from delete_network_precommit with an open session
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Rodolfo Alonso |
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_
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:/
[1] https:/
[2] https:/
description: | updated |
description: | updated |
tags: | added: segment-callback-without-open-session |
Changed in neutron: | |
importance: | Undecided → Medium |
Changed in neutron: | |
assignee: | nobody → Rodolfo Alonso (rodolfo-alonso-hernandez) |
Fix proposed to branch: master /review. opendev. org/c/openstack /neutron/ +/852885
Review: https:/