delete_net_assoc_precommit should be done before deleting bgpvpn net assoc

Bug #1709647 reported by Omar Sanhaji
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-bgpvpn
Fix Released
Undecided
Thomas Morin

Bug Description

To delete a network association the driver api start a transaction, delete the network association, checks precommit conditions and commit the changes.
I am working on implementing ovo rpc calls for bagpipe driver, and I need to get the object before it is deleted from the database, to notify the agent.
Wouldn't it make more sense to have the precommit before deleting the network association from the database, or else, nothing can be done on the object ?

Revision history for this message
Omar Sanhaji (sanhaji-omar) wrote :
Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

Agreed, this will allow drivers to read the DB with the object being present at delete precomit time.

I've had a look at ODL driver, which uses these hooks and I don't think the change would affect its behavior.

I haven't checked OpenContrail or Nuage.

I we find out that they are affected, the alternative solution is to *add* a hook in the transaction , but before DB deletion.

Changed in bgpvpn:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-bgpvpn (master)

Fix proposed to branch: master
Review: https://review.openstack.org/499943

Changed in bgpvpn:
assignee: nobody → Thomas Morin (tmmorin-orange)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-bgpvpn (master)

Reviewed: https://review.openstack.org/499943
Committed: https://git.openstack.org/cgit/openstack/networking-bgpvpn/commit/?id=79c7a61267600629b3e2fee727d9c3d80af5db04
Submitter: Jenkins
Branch: master

commit 79c7a61267600629b3e2fee727d9c3d80af5db04
Author: Omar Sanhaji <email address hidden>
Date: Wed Aug 30 10:27:53 2017 +0200

    Switch DB and driver precommit methods for delete and update

    Deleting network and router assoc calls need to execute precommit and
    postcommit checks. The method deleted the object in the DB before making
    precommit checks.

    With this change it makes precommit checks before deleting the object, which
    allows the drivers to read the DB with the object being present at delete
    precomit time.

    The same change is applied to updates.

    Co-Authored-By: Omar Sanhaji <email address hidden>
    Co-Authored-By: Thomas Morin <email address hidden>

    Closes-Bug: #1709647
    Partial Implements: blueprint bagpipe-bgpvpn-ovo

    Change-Id: I4a191c1c6a1c5281cd18e07dcee534dc84338acc

Changed in bgpvpn:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-bgpvpn 8.0.0.0b1

This issue was fixed in the openstack/networking-bgpvpn 8.0.0.0b1 development milestone.

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.